Title: PHP errors
Last modified: May 12, 2022

---

# PHP errors

 *  Resolved [Peter Smits](https://wordpress.org/support/users/psmits1567/)
 * (@psmits1567)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-errors-269/)
 * Hi,
 * After updating the site to the latest version of WordPress I get the following
   warnings
    Trying to access array offset on value of type bool in /www/wp-content/
   plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 2956
   Can you provide a fix for that? The add-on does still blocks unwanted visitors
   Regards, Peter

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

 *  Plugin Author [IP2Location](https://wordpress.org/support/users/ip2location/)
 * (@ip2location)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-errors-269/#post-15641038)
 * Hi,
 * Can you please do a database update under the plugin settings and try again?
 * It looks like there is a problem with the lookup result.
 *  [psmits1568](https://wordpress.org/support/users/psmits1568/)
 * (@psmits1568)
 * [4 years ago](https://wordpress.org/support/topic/php-errors-269/#post-15648359)
 * Hi,
 * Thanks for your support, I performed the action you described.
    But yesterday
   I noticed the same error again [15-May-2022 02:52:58 UTC] PHP Warning: Trying
   to access array offset on value of type bool in /www/wp-content/plugins/ip2location-
   country-blocker/ip2location-country-blocker.php on line 2956 [15-May-2022 02:
   52:58 UTC] PHP Warning: Trying to access array offset on value of type bool in/
   www/wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.
   php on line 2957
 * Any suggestions?
    Peter
 *  Plugin Author [IP2Location](https://wordpress.org/support/users/ip2location/)
 * (@ip2location)
 * [4 years ago](https://wordpress.org/support/topic/php-errors-269/#post-15651067)
 * I made some fixes to this issue. Please update to version 2.26.12.
 *  Thread Starter [Peter Smits](https://wordpress.org/support/users/psmits1567/)
 * (@psmits1567)
 * [4 years ago](https://wordpress.org/support/topic/php-errors-269/#post-15652586)
 * Hi, This morning I updated my site with the patch.
    3 hours later no errors yet,
   but I think we will have to wait a bit longer. Then tomorrow I will let you know
   if it is fixed with this patch Thanks for the quick support! Peter
 *  Thread Starter [Peter Smits](https://wordpress.org/support/users/psmits1567/)
 * (@psmits1567)
 * [4 years ago](https://wordpress.org/support/topic/php-errors-269/#post-15654350)
 * Hi,
 * Checked my logging and noticed the following errors
 *     ```
       [17-May-2022 16:51:06 UTC] PHP Warning:  Undefined variable $caches in /www/wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 3057
       [17-May-2022 16:51:06 UTC] PHP Warning:  Undefined variable $caches in /www/wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 3058
       [17-May-2022 16:51:06 UTC] PHP Warning:  Trying to access array offset on value of type null in /www/wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 3058
       [17-May-2022 16:51:06 UTC] PHP Warning:  Undefined variable $caches in /www/wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 3059
       ```
   
 * I hope this helps you find a solution
    Peter
 *  Plugin Author [IP2Location](https://wordpress.org/support/users/ip2location/)
 * (@ip2location)
 * [4 years ago](https://wordpress.org/support/topic/php-errors-269/#post-15654911)
 * Can you update to the latest version for this fix?
 *  Thread Starter [Peter Smits](https://wordpress.org/support/users/psmits1567/)
 * (@psmits1567)
 * [4 years ago](https://wordpress.org/support/topic/php-errors-269/#post-15663783)
 * Hi,
 * Just checked my site, there are currently no more errors present
    So it seems
   to be resolved Thanks for the quick fixes Peter

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

The topic ‘PHP errors’ is closed to new replies.

 * ![](https://ps.w.org/ip2location-country-blocker/assets/icon-128x128.png?rev=
   2121917)
 * [IP2Location Country Blocker](https://wordpress.org/plugins/ip2location-country-blocker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ip2location-country-blocker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ip2location-country-blocker/)
 * [Active Topics](https://wordpress.org/support/plugin/ip2location-country-blocker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ip2location-country-blocker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ip2location-country-blocker/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [Peter Smits](https://wordpress.org/support/users/psmits1567/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/php-errors-269/#post-15663783)
 * Status: resolved