Title: Uncaught TypeError: in_array()
Last modified: September 9, 2023

---

# Uncaught TypeError: in_array()

 *  Resolved [Jos Klever](https://wordpress.org/support/users/josklever/)
 * (@josklever)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/uncaught-typeerror-in_array/)
 * I was trying to scan a website for a client and installed your plugin, but I 
   received an error notification, that’s probably related to PHP 8.2. The scan 
   seems to work, but I wanted to report it anyway:
 *     ```wp-block-code
       An error of type E_ERROR was caused in line 956 of the file
       /.../wp-content/plugins/gotmls/index.php.
       Error message: Uncaught TypeError: in_array(): Argument #2 ($haystack)
       must be of type array, null given in
       /.../wp-content/plugins/gotmls/index.php:956
       Stack trace:
       #0 /.../wp-content/plugins/gotmls/index.php(956):
       in_array()
       #1 /.../wp-includes/class-wp-hook.php(310):
       GOTMLS_settings()
       #2 /.../wp-includes/class-wp-hook.php(334):
       WP_Hook->apply_filters()
       #3 /.../wp-includes/plugin.php(517):
       WP_Hook->do_action()
       #4 /.../wp-admin/admin.php(259):
       do_action()
       #5 {main}
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Eli](https://wordpress.org/support/users/scheeeli/)
 * (@scheeeli)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/uncaught-typeerror-in_array/#post-17039778)
 * Thank you for reporting these details. I think I have found the cause of this
   but I cannot recreate the error on any of my test sites, can you please send 
   me a screenshot of the Anti-Malware Setting page in your wp-admin?
 *  Thread Starter [Jos Klever](https://wordpress.org/support/users/josklever/)
 * (@josklever)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/uncaught-typeerror-in_array/#post-17040409)
 * The plugin has already been removed after scanning the site, but I’l try to describe
   it. When loading the settings page for the first time, I only saw the right sidebar
   with the option to register, what I did. The left part was empty. Then I could
   retrieve the definition updates and after that the left part of the screen was
   loaded with the options. I’ve only cleared the excluded extensions and started
   a scan. In the end nothing was found. So it looks like the error was given at
   the initial load already.
 * Hopefully this still helps you a bit.
 *  Plugin Author [Eli](https://wordpress.org/support/users/scheeeli/)
 * (@scheeeli)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/uncaught-typeerror-in_array/#post-17055851)
 * Ok, Thanks for the details. I have released a plugin update that should fix this
   issue. If you have the opportunity to try it again, on this or any other site,
   then please let me know how it works for you.
 *  Thread Starter [Jos Klever](https://wordpress.org/support/users/josklever/)
 * (@josklever)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/uncaught-typeerror-in_array/#post-17055873)
 * I don’t have a site running on PHP 8.2 available at the moment, but I did a quick
   test on a sites with 8.1.22 and I didn’t see the issue there with the new version.
   If I run into something again in the future, I’ll report back to you.
 * Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Uncaught TypeError: in_array()’ is closed to new replies.

 * ![](https://ps.w.org/gotmls/assets/icon-256x256.png?rev=1001824)
 * [Anti-Malware Security and Brute-Force Firewall](https://wordpress.org/plugins/gotmls/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gotmls/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gotmls/)
 * [Active Topics](https://wordpress.org/support/plugin/gotmls/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gotmls/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gotmls/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Jos Klever](https://wordpress.org/support/users/josklever/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/uncaught-typeerror-in_array/#post-17055873)
 * Status: resolved