• Resolved JuniperPaul

    (@juniperpaul)


    Jules, thank you for your highly useful plugin~

    With CF7CF 2.5.9 + PHP 8.2 (+ WordPress 6.7.2) I’m getting this error message in my server log and failures of the plugin to complete:

    PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /.../wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 434

    That source code reads:

    433: function wpcf7cf_endswith($string, $test) {
    434: $strlen = strlen($string);

    Clearly what’s required is a forced string type or alternative. There’s discussion of this aspect of strlen() in the User Contributor Notes at https://www.php.net/manual/en/function.strlen.php#127814

    Although this is the only such incompatibility I’ve encountered between CF7CF 2.5.9 and PHP 8.2, strlen() is one of many functions that have developed backward vulnerabilities since PHP 7.2.

    Happy coding,
    Paul

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    Hi Paul, thanks for letting me know. My dev env is still using PHP 8.0. I’ll make sure to upgrade it to PHP 8.2 soon.

    Plugin Author Jules Colle

    (@jules-colle)

    This was fixed in the last update. I still need to work out a proper strategy to test older versions of PHP, but just wanted to let you know that my dev env is now updated to PHP 8.2 and so PHP 8.2 is the recommended version to use from now on.

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

The topic ‘strlen() error – CF7CF 2.5.9 – PHP 8.2’ is closed to new replies.