• Resolved knubew

    (@knubew)


    Hello,

    after switching from PHP 7.4.x to 8.x I found tons of the following messages in my “error_log”:

    PHP message: PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/vhosts/my.domain.com/httpdocs/portal/wp-content/plugins/pods/classes/Pods.php on line 1722;

    I know this is not a critical bug. However, it would be great if you would fix this, because the “error_log” file grows unnecessarily to several megabytes every day.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @knubew

    Thanks for reporting! I’ve created a simple patch that should address this, could you let me know if this works for you:

    https://github.com/pods-framework/pods/pull/7076

    Cheers, Jory

    Thread Starter knubew

    (@knubew)

    Thank you very much for the patch. I will test it and then report to you.

    Thread Starter knubew

    (@knubew)

    The patch works. The error message no longer occurs. Thanks very much.

    However, I encountered some other error messages in the error_log file involving pods. I’ll list them here now (with shortened paths):

    PHP message: PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in .../wp-content/plugins/pods/includes/general.php on line 1408;

    PHP message: PHP Deprecated: strlen(): Passing null to par
    ameter #1 ($string) of type string is deprecated in .../wp-content/plugins/pods/includes/general.php on line 1577;

    Got error '.../wp-content/plugins/pods/includes/general.php on line 1577; PHP message: PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in …/wp-content/plugins/pods/includes/general.php on line 1585;

    PHP message: PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in .../wp-content/plugins/pods/includes/general.php on line 1589;

    PHP message: PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in .../wp-content/plugins/pods/includes/general.php on line 1592;

    Thread Starter knubew

    (@knubew)

    Hello,

    I can well imagine that the use of “strlen” in the entire pods code could possibly be checked, because there are so many error messages under PHP 8.x – or what do you think?

    Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    I have fixes for many PHP 8 things in Pods 3.0 already but I’ll see if I can backport a few into Pods 2.9.14

    Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    Resolved in Pods 2.9.14 (to be released this week) and merged that into Pods 3.0 too for the next public beta.

    Thread Starter knubew

    (@knubew)

    Resolved in Pods 2.9.14 (to be released this week)

    That’s great. Thank you very much.

    Thread Starter knubew

    (@knubew)

    F.y.i. I just found another one:

    PHP message: PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in .../wp-content/plugins/pods/classes/PodsField.php on line 907;

    Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    Fixing that one in Pods 2.9.15 out today along with a few others that follow that pattern too.

    Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    Pods 2.9.15 is now out with those fixes

    Thread Starter knubew

    (@knubew)

    Thank you very much, but read https://github.com/pods-framework/pods/issues/7089 please. It’s related to an old error https://github.com/pods-framework/pods/issues/6971

    I receive:
    Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /wp-content/plugins/pods/classes/fields/pick.php on line 2959

    I’m on Php 8.2.7, WordPress 6.3.1, Pods 3.0.1.

    Thank you!
    Riccardo

    Sorry for writing in pieces, also Pods.php at line 741.

    Thank you!
    Riccardo

    Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    Both those are fixed in Pods 3.0.2 which will go out this week as soon as I finish a couple of other important fixes for folks.

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

The topic ‘Tons of “PHP Deprecated: strlen():” messages in error.log under PHP 8.x’ is closed to new replies.