• Resolved ez2498

    (@ez2498)


    Hi. Thank you for this plugin! This is a really useful feature to have.

    I noticed the following warning message displaying in my admin dashboard after installing the plugin:

    “Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-includes/functions.php on line 7360 Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/wp-includes/functions.php on line 2195”

    I am currently using PHP 8.1.33 and WordPress 6.8.1. Is this something you can help take a look at if you can reproduce?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Matthew Reilly

    (@creativemashwp)

    Hi there

    Thanks for the message and for using the plugin. Glad to hear you find it useful.

    Those notices are PHP 8.1 deprecation warnings. They happen when something passes a null value into strpos or str_replace, and WordPress then throws the warning from wp-includes/functions.php.

    I’ll set up a test install with WordPress 6.8.1 and PHP 8.1.33 and try to reproduce this with the plugin active so I can track down where the null value is coming from and fix it.

    It is also likely you are seeing this because debug mode is turned on. When debug is on, WordPress will show every notice on screen. Turning debug off would hide these messages, though I know that is not ideal. I still want the plugin to work at its best, so I will look into this properly.

    Can you confirm two quick things
    • the notices disappear when the plugin is deactivated
    • the warnigns reappear when you reactivate it with everything else unchanged

    These are only deprecation notices so nothing will break, but they shouldn’t appear and I’ll sort it.

    Thanks again for flagging it.

    Thread Starter ez2498

    (@ez2498)

    Thank you for your response and taking a look at this.

    Correct, the warning message does go away when I only deactivated this plugin and then comes back when I activate. I didn’t change anything else.

    Plugin Author Matthew Reilly

    (@creativemashwp)

    Hi ez2498

    I’ve found the source of the issue and have now fixed it. I’ve tested it on my side with WordPress 6.8.1 and PHP 8.1.33, and those deprecation warnings no longer appear.

    It was only visible because debug mode was turned on, but it was still worth resolving so no one else runs into the same thing.

    Thanks again for taking the time to report it. Let me know if you spot anything else.
    Matthew

    Thread Starter ez2498

    (@ez2498)

    Hi Matthew,

    Of course and thank you for resolving!

    Thanks

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

The topic ‘Dashboard Warning Message’ is closed to new replies.