Support » Plugin: Autoptimize » PHP 7.3 Support (PHP Deprecated: strpos())

  • Resolved Tharindu

    (@freddy63)


    I’m getting lots of these errors after upgrading to PHP 7.3.

    FastCGI sent in stderr: "PHP message: PHP Deprecated: strpos(): Non-string needles
    will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in
    /var/www/domain.com/html/wp-content/plugins/autoptimize/classes/autoptimizeExtra.php on line 161" while reading response header from
    upstream

    I’m on a nginx server.

    Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Well, technically those are not errors, but rather warnings that strpos will not work a certain way at a later PHP-version so for now you can safely ignore. in the mean time I’ll look into this ๐Ÿ™‚

    frank

    Thread Starter Tharindu

    (@freddy63)

    Thanks Frank

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    question; does the warning also point to other lines in autoptimizeExtra.php or to other files?

    if so; can you mail me an excerpt of your php-errorlog to futtta-at-gmail-dot-com?

    Thread Starter Tharindu

    (@freddy63)

    It’s just the line 161 of autoptimizeExtra.php

    I’ve sent you the log.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, I have a (presumed) fix in the Github-version, could you download AO 2.5.1-beta here and take it out for a spin to confirm all is well?

    thanks!
    frank

    Thread Starter Tharindu

    (@freddy63)

    Now getting

     FastCGI sent in stderr: "PHP message: PHP Warning: strpos(): Empty needle in
    /var/www/domain.com/html/wp-content/plugins/autoptimize/classes/autoptimizeExtra.php on line 162
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    how bizarre, I don’t see how a non-string or after casting empty string would end up there. but I’ll add an extra check, give me a second ๐Ÿ˜‰

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, more checks in, can you re-download and test the beta? ๐Ÿ™‚

    Thread Starter Tharindu

    (@freddy63)

    That commit seems to do the trick.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, that will be in AO 2.5.1 out later this month ๐Ÿ™‚

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘PHP 7.3 Support (PHP Deprecated: strpos())’ is closed to new replies.