Title: error in debug.log deprecated
Last modified: October 23, 2023

---

# error in debug.log deprecated

 *  Resolved [Peter Smits](https://wordpress.org/support/users/psmits1567/)
 * (@psmits1567)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/error-in-debug-log-deprecated/)
 * The plugin uses an old code which causes the error below
 * [23-Oct-2023 10:41:37 UTC] PHP Deprecated: preg_match(): Passing null to parameter#
   2 ($subject) of type string is deprecated in /wp-content/plugins/ip2location-
   country-blocker/ip2location-country-blocker.php on line 1980

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

 *  Plugin Author [IP2Location](https://wordpress.org/support/users/ip2location/)
 * (@ip2location)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/error-in-debug-log-deprecated/#post-17145385)
 * It has been fixed in version 2.33.1.
 *  Thread Starter [Peter Smits](https://wordpress.org/support/users/psmits1567/)
 * (@psmits1567)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/error-in-debug-log-deprecated/#post-17145869)
 * Thanks will download and install this patch
 *  [dragon013](https://wordpress.org/support/users/dragon013/)
 * (@dragon013)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/error-in-debug-log-deprecated/#post-17351834)
 * I am running version 2.33.5 and the error is still there.
 * PHP Version is 8.1.22
 * `PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type
   array|string is deprecated in /wp-content/plugins/ip2location-country-blocker/
   ip2location-country-blocker.php on line 1974`
 *  Plugin Author [IP2Location](https://wordpress.org/support/users/ip2location/)
 * (@ip2location)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/error-in-debug-log-deprecated/#post-17352305)
 * [@dragon013](https://wordpress.org/support/users/dragon013/) Fixed in version
   2.33.6.
 *  [dragon013](https://wordpress.org/support/users/dragon013/)
 * (@dragon013)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/error-in-debug-log-deprecated/#post-17353199)
 * I just updated and it’s stil there
 *     ```wp-block-code
       Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 1974
       ```
   

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

The topic ‘error in debug.log deprecated’ 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/)

 * 5 replies
 * 3 participants
 * Last reply from: [dragon013](https://wordpress.org/support/users/dragon013/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/error-in-debug-log-deprecated/#post-17353199)
 * Status: resolved