• Resolved acsafrica

    (@acsafrica)


    [23-Oct-2025 15:50:59 UTC] PHP Deprecated:  preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/abanista/public_html/wp-content/plugins/woocommerce/includes/libraries/class-wc-eval-math.php on line 162
    [23-Oct-2025 15:50:59 UTC] PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/abanista/public_html/wp-content/plugins/woocommerce/includes/libraries/class-wc-eval-math.php on line 162
    [23-Oct-2025 15:51:00 UTC] PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/abanista/public_html/wp-content/plugins/woocommerce/includes/libraries/class-wc-eval-math.php on line 162
    [23-Oct-2025 15:51:00 UTC] PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/abanista/public_html/wp-content/plugins/woocommerce/includes/libraries/class-wc-eval-math.php on line 162
    [23-Oct-2025 15:51:00 UTC] PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/abanista/public_html/wp-content/plugins/woocommerce/includes/libraries/class-wc-eval-math.php on line 162
    [23-Oct-2025 15:51:01 UTC] PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/abanista/public_html/wp-content/plugins/woocommerce/includes/libraries/class-wc-eval-math.php on line 162
    [23-Oct-2025 15:51:01 UTC] PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/abanista/public_html/wp-content/plugins/woocommerce/includes/libraries/class-wc-eval-math.php on line 162
    [23-Oct-2025 15:51:01 UTC] PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/abanista/public_html/wp-content/plugins/woocommerce/includes/libraries/class-wc-eval-math.php on line 162
    [23-Oct-2025 15:51:02 UTC] PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/abanista/public_html/wp-content/plugins/woocommerce/includes/libraries/class-wc-eval-math.php on line 162
    [23-Oct-2025 15:51:02 UTC] PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/abanista/public_html/wp-content/plugins/woocommerce/includes/libraries/class-wc-eval-math.php on line 162
    [23-Oct-2025 15:51:03 UTC] PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/abanista/public_html/wp-content/plugins/woocommerce/includes/libraries/class-wc-eval-math.php on line 162
    [23-Oct-2025 15:51:03 UTC] PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/abanista/public_html/wp-content/plugins/woocommerce/includes/libraries/class-wc-eval-math.php on line 162
    [23-Oct-2025 15:51:03 UTC] PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/abanista/public_html/wp-content/plugins/woocommerce/includes/libraries/class-wc-eval-math.php on line 162

    i am encountering multiple logs of above type

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @acsafrica ,
    This is a PHP 8.4 compatibility issue with WooCommerce. it’s just a deprecation warning, not breaking anything. You can downgrade PHP version. 8.2 or 8.3 (note: make sure your other’s theme/plugins won’t have any issue with these version. Probably WooCommerce isn’t fully compatible with PHP 8.4 but they are actively working on it.
    The warning you are getting is about WooCommerce’s math library is passing null values which PHP 8.4 now flags as deprecated.

    Hi @acsafrica,

    Thank you for bringing up the issue you’re experiencing with WooCommerce on PHP 8.4. I understand how concerning it can be to see repeated deprecation warnings, and it’s completely reasonable to want clarity on what’s happening and how to resolve it.

    I appreciate the helpful insights shared by @shsajalchowdhury, who explained that this is a compatibility issue with WooCommerce when running on PHP 8.4. Thankfully, this warning is about deprecated behavior—it won’t break your site, but it does point out where WooCommerce’s math library is passing null values to the preg_match() function, which PHP 8.4 now flags as deprecated.

    For now, a practical solution would be to downgrade your PHP version to 8.2 or 8.3 if possible (just be sure to check that your other plugins and themes will work well on those versions first). WooCommerce developers are actively working to update compatibility with newer PHP releases.

    If you have further questions or encounter any other issues as you adjust your PHP setup, please let us know. We’re here to help!

    Plugin Support thelmachido a11n

    (@thelmachido)

    It’s been a while since we heard back from you for this reason we are closing this thread. 

    If WooCommerce has been useful for your store and you appreciate the support you’ve received, we’d truly appreciate it if you could leave us a quick review here: 

     https://ww.wp.xz.cn/support/plugin/woocommerce/reviews/#new-post

    Feel free to open a new forum topic if you run into any other problem. 

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

The topic ‘Error with PHP 8.4’ is closed to new replies.