• Resolved Malae

    (@malae)


    Hello,

    I am using this plugin and the wp-debug.log file is being flooded with PHP warnings:

    PHP Warning: strnatcasecmp() expects parameter 1 to be string, array given in /wp-includes/class-wp-customize-widgets.php on line 1111
    PHP Warning: strnatcasecmp() expects parameter 2 to be string, array given in /wp-includes/class-wp-customize-widgets.php on line 111

    Searching for the string, the only instance found was as follows:

    …ipslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|st… /wp-content/plugins/easy-image-collage/vendor/vafpress/public/js/vendor/ace/mode-php.js
    Is this the culprit. If so, can you fix the issue?

    • This topic was modified 2 years, 2 months ago by Malae.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Brecht

    (@brechtvds)

    Hi there,

    Are you sure the warning is coming from Easy Image Collage? Does it stop generating them if you deactivate our plugin for a second?

    That file you find is a JavaScript file and shouldn’t be generating any PHP warnings. It’s related to a library that displays a code editor, so the “strnatcasecmp” string is essentially in there to highlight that as being a PHP function. It doesn’t actually execute that function.

    The /wp-includes/class-wp-customize-widgets.php file it references is a core WordPress file and it seems to use that strnatcasecmp function to sort widgets by name.

    Easy Image Collage doesn’t include any widgets, so I’d be very surprised if the warning is caused by it.

    • This reply was modified 2 years, 2 months ago by Brecht.
    Thread Starter Malae

    (@malae)

    Hi Brecht,

    Thanks for your prompt response. I think you are correct, I was probably wrong in assuming that it was not caused by code in a core file. There are several files in wp-includes that have the string and I will check further.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Warnings’ is closed to new replies.