Title: php8.x Uncaught TypeError
Last modified: March 28, 2024

---

# php8.x Uncaught TypeError

 *  Resolved [stormkuo](https://wordpress.org/support/users/stormkuo/)
 * (@stormkuo)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/php8-x-uncaught-typeerror/)
 * Your map plugin is fantastic, and I’ve been using it for 6 years. I’ve even developed
   a special search system with it. It works fine in PHP 7.4, but after upgrading
   to PHP 8.0, I encountered the following error, and the map search is interrupted
   halfway through. Do you have any insights on this?
 * Uncaught TypeError: Cannot use ‘in’ operator to search for ‘length’ in
 * `at c (jquery.min.js:2:1131) at Function.each (jquery.min.js:2:3090) at Object.
   success (wpsl-gmap.min.js:1:11932) at c (jquery.min.js:2:25304) at Object.fireWith[
   as resolveWith] (jquery.min.js:2:26053) at l (jquery.min.js:2:77782) at XMLHttpRequest.
   <anonymous> (jquery.min.js:2:80265)"`

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

 *  [farroyo](https://wordpress.org/support/users/farroyob/)
 * (@farroyob)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/php8-x-uncaught-typeerror/#post-17534481)
 * Hi there, thanks for reaching out.
 * Wp Store Locator is fully compatible with versions of PHP up to the most recent(
   8.3.X as of today), so please double check you have the latest version of the
   plugin. If you do, then also double check the version of jQuery that your theme
   is using, and also that you don’t have any other plugins that may be interfering
   with jQuery. If in doubt, you can also share with us the URL of your website 
   and I can also take a look, see if I can spot anything.
 * Best regards,
 *  Thread Starter [stormkuo](https://wordpress.org/support/users/stormkuo/)
 * (@stormkuo)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/php8-x-uncaught-typeerror/#post-17547950)
 * My website is [https://furkid.org/](https://furkid.org/).
 * I’ve used the map plugin you developed to create a nonprofit website where users
   can search for pet-friendly locations nearby or in specific areas.
 * Currently, I’ve adjusted PHP to 8.3.4, but when searching beyond my own location,
   the search stops halfway through. Please take a look, thank you.
 *  [farroyo](https://wordpress.org/support/users/farroyob/)
 * (@farroyob)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/php8-x-uncaught-typeerror/#post-17548003)
 * Hi again,
 * Thanks for the URL. I can see you are using an optimization plugin (autoptimize).
   These type of plugins are known to sometimes cause issues with javascript-rich
   plugins like Wp Store Locator. To rule this out, could you please disable momentarily“
   autoptimize”, and see if the issue persists?
 * Also, make sure Wp Store Locator is updated to the latest version (2.2.241).
 * Let us know, many thanks!
 *  [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/php8-x-uncaught-typeerror/#post-17548029)
 * pro-tip; you can generally disable Autoptimize on a per-request basis by adding`?
   ao_noptirocket=1` to the URL.
 * if the problem is not there at that point, some autoptimize (re-)configuration
   might be needed to fix this. there are troubleshooting tips and info on how to
   exclude in [the AO FAQ](https://wordpress.org/plugins/autoptimize/#faq).
 * hope this helps debugging,
    frank (ao dev)

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

The topic ‘php8.x Uncaught TypeError’ is closed to new replies.

 * ![](https://ps.w.org/wp-store-locator/assets/icon-256x256.jpg?rev=1007784)
 * [WP Store Locator](https://wordpress.org/plugins/wp-store-locator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-store-locator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-store-locator/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-store-locator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-store-locator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-store-locator/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/php8-x-uncaught-typeerror/#post-17548029)
 * Status: resolved