• Resolved dyin

    (@dyin)


    Hello Rank Math Team,


    While using PHP 8.4, I’ve noticed a deprecation notice from the Rank Math SEO plugin:

    PHP Deprecated: number_format(): Passing null to parameter #1 ($num) of type float is deprecated in /path/to/wp-content/plugins/seo-by-rank-math/includes/modules/analytics/class-summary.php on line 123

    It appears that on line 123 of class-summary.php in the analytics module, number_format() is sometimes called with null for its first parameter. This should likely be a float (e.g., 0.0) or checked for null before the call to ensure PHP 8.4+ compatibility.

    Could you please investigate this for an upcoming release?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter dyin

    (@dyin)

    Actually I also have it with PHP 8.3 I think. For the record, all my plugins etc are up to date

    Thread Starter dyin

    (@dyin)

    This morning I found these. No other errors in the logs from other plugins.

    [21-May-2025 11:27:00 UTC] PHP Deprecated: number_format(): Passing null to parameter #1 ($num) of type float is deprecated in /data/sites/web/website/www/wp-content/plugins/seo-by-rank-math/includes/modules/analytics/class-summary.php on line 123

    [21-May-2025 16:00:39 UTC] PHP Warning: Trying to access array offset on false in /data/sites/web/website/www/wp-content/plugins/seo-by-rank-math/includes/modules/version-control/class-beta-optin.php on line 148

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @dyin,

    Thank you for contacting support.

    The first error in the log is a deprecation in the code of our Analytics module. This has been noted internally and when we review that module we will also take care of that and any other deprecations we can find.

    The second one is a warning in the version control module and it happens when there’s no transient with the plugin data fetched from the WordPress HTTP API using the function wp_remote_get() . Can you please confirm if your website is able to return the full data when the following is called?

    wp_remote_get('https://api.wordpress.org/plugins/info/1.0/seo-by-rank-math.json');

    Looking forward to hearing back from you.

    Thread Starter dyin

    (@dyin)

    @rankmathsupport Thank you for your reply. The last one seemed to be a temporary issue as it seems to be fine now. The first one is however very frequent in the logs. Looking forward to the fix πŸ™‚

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @dyin,

    You can keep track of the updates of our plugin in our changelog page: https://rankmath.com/changelog

    Alternatively, the changelog of the Free plugin can also be accessed in the WordPress repository for your plugin: https://wordpress.org/plugins/seo-by-rank-math/#developers

    Thank you.

    This says resolved, but I am having the same issue



    root@wordpress-phpfpm-test:/var/www/html# sudo grep "rank" /var/www/html/wp-content/debug.log
    [03-Jun-2025 21:06:20 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 123
    [03-Jun-2025 21:06:20 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 128
    [03-Jun-2025 21:46:01 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 123
    [03-Jun-2025 21:46:01 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 128
    [03-Jun-2025 22:02:20 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 123
    [03-Jun-2025 22:02:20 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 128
    [03-Jun-2025 23:24:31 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 123
    [03-Jun-2025 23:24:31 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 128
    [04-Jun-2025 00:02:45 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 123
    [04-Jun-2025 00:02:45 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 128
    [04-Jun-2025 01:02:20 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 123
    [04-Jun-2025 01:02:20 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 128
    [04-Jun-2025 02:36:47 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 123
    [04-Jun-2025 02:36:47 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 128
    [04-Jun-2025 02:36:48 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 123
    [04-Jun-2025 02:36:48 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 128
    [04-Jun-2025 04:02:20 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 123
    [04-Jun-2025 04:02:20 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 128
    [04-Jun-2025 05:07:08 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 123
    [04-Jun-2025 05:07:08 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 128
    [04-Jun-2025 05:46:16 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 123
    [04-Jun-2025 05:46:16 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 128
    [04-Jun-2025 07:02:21 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 123
    [04-Jun-2025 07:02:21 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 128
    [04-Jun-2025 10:02:21 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 123
    [04-Jun-2025 10:02:21 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 128
    root@wordpress-phpfpm-test:/var/www/html#
    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @thenerdforthat,

    Those deprecation notices you are seeing are not related to the ones reported in this thread.

    The ones you shared happen on a different place and they would only happen when you have enabled the option to remove the product base from WooCommerce products and the functions for WooCommerce are being triggered on non-product pages.

    We would suggest doing a plugin conflict to see which plugin could be triggering these functions outside the product scope: https://rankmath.com/kb/check-plugin-conflicts/

    If you find the culprit please let us know by opening a new ticket so that we can investigate this further.

    Thank you.

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

The topic ‘PHP 8.4 depreciation notice’ is closed to new replies.