• In a dev environment I receive the following warning on pages using Version 2.2.241 of the WP Store Locator plugin

    Warning: Undefined array key “deregister_gmaps” in /home/customer/www/dev01.moresmartspace.com/public_html/wp-content/plugins/wp-store-locator/frontend/class-frontend.php on line 1562

    WordPress 6.4.2, default 2023 theme, all other plugins disabled, PHP 8.2.13, but occurs in 8.1 as well. 7.4.33 appears to be the highest version I can get to operate without the warning.

    • This topic was modified 2 years, 6 months ago by jfriedley.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there, thanks for reaching out.

    I don’t think the issue is related to your version of PHP or WordPress, we are running the plugin in WordPress 6.4.2 and we’ve been testing all modern versions of PHP up to the most recent (8.3.0) to ensure compatibility, and it has been working flawlessly.

    Do you have any custom code in your functions.php file, something that could be causing some interactions with Wp Store Locator?

    You can always try to enable the setting “Enable compatibility mode” in the Wp Store Locator settings page, this sometimes helps.

    Please let me know if any of the above makes sense to you.

    Regards,

    Thread Starter jfriedley

    (@jfriedley)

    Thank you for the response. The functions.php is stock from the theme however, this is a network installation so that may make a difference I suppose….

    My understanding is PHP 8.0 introduced some changes to error handling and reporting. If the plugin code is relying on keys that are not always guaranteed to be present, it can lead to these warnings. Looking at the code I believe it’s recommended to check that the key ‘address_format’ is set.

            $address_format = explode( '_', $wpsl_settings['address_format'] );

    with something like this

     if (isset($wpsl_settings['address_format'])) { $address_format = explode('_', $wpsl_settings['address_format']);

    Hi again, thanks for getting back.

    Your input is very interesting, however we have been running the plugin always in the latest PHP version (8.3.0 as of today) and we’ve never come across that warning before, or at least we haven’t noticed it!

    Having said that, I am not using the plugin in a multisite environment, but I doubt that would make any difference. I’ll double check my installation in case I we overlooked that warning, though!

    Regards,

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

The topic ‘Warning: Undefined array key “deregister_gmaps”’ is closed to new replies.