• Resolved BERJAYAdavecunnington

    (@davecunnington)


    Hey Jeff, thanks for your plugin and supporting the WordPress community!

    Running the plugin on some sites in PHP 8.1+ throws some warnings surrounding the use of explode() when the string is null. Specifically, plugin-core.php:407, method: disable_gutenberg_explode($string) when trimming. Recommend either adding a default value $string = '' or some quick error checking in the method before using the variable on line 409.

    Happy to submit a PR!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author BERJAYAJeff Starr

    (@specialk)

    Thanks for the report, Dave. Will get this fixed up for the next release.

    Plugin Author BERJAYAJeff Starr

    (@specialk)

    This is resolved in version 3.2, available later today.

    Thanks again for reporting.

    Thread Starter BERJAYAdavecunnington

    (@davecunnington)

    Thanks again for providing this plugin to the community!

    Thread Starter BERJAYAdavecunnington

    (@davecunnington)

    Sorry Jeff, I gave bad information for the fix. After checking the docs I see that “passing null does not assign the default value” so the fix should be in the method instead of adding the default value to the method parametres.

    If you can’t use the null coalesce for backwards compatibility then the method will need something like:

    if (!$string) {
    $string = "";
    }

    Plugin Author BERJAYAJeff Starr

    (@specialk)

    Thanks Dave, just released 3.2.1 which hopefully should resolve this.

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

The topic ‘PHP 8.1+ Support’ is closed to new replies.