• Resolved nir0ma

    (@nir0ma)


    Hi,

    I’m running litespeed cache v3.5.2 and I’ve got these warnings in litespeed-toolbox#log_viewer :

    PHP Warning: strpos() expects parameter 1 to be string, array given in wp-content/plugins/litespeed-cache/src/optimize.cls.php on line 231

    PHP Warning: strpos() expects parameter 1 to be string, array given in wp-content/plugins/litespeed-cache/src/optimize.cls.php on line 227

    EDIT : Also got this notice : Array to string conversion in wp-content/plugins/litespeed-cache/src/css.cls.php on line 390

    Have a nice day !

    • This topic was modified 4 years, 4 months ago by nir0ma.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi,

    Same issue here.

    [05-Nov-2020 07:38:42 Europe/Bucharest] PHP Warning: strpos() expects parameter 1 to be string, array given in /wp-content/plugins/litespeed-cache/src/optimize.cls.php on line 227
    [05-Nov-2020 07:38:42 Europe/Bucharest] PHP Warning: strpos() expects parameter 1 to be string, array given in /wp-content/plugins/litespeed-cache/src/optimize.cls.php on line 231

    THanks

    Plugin Support Hai Zheng?

    (@hailite)

    Are you able to reproduce it?

    Hi, Same issue here… (WP:5.5.3 PHP:7.4)
    [09-Nov-2020 10:56:20 UTC] PHP Warning: parse_url() expects parameter 1 to be string, array given in /home/site/public_html/wp-content/plugins/litespeed-cache/src/utility.cls.php on line 707
    [09-Nov-2020 10:56:20 UTC] PHP Warning: parse_url() expects parameter 1 to be string, array given in /home/site/public_html/wp-content/plugins/litespeed-cache/src/css.cls.php on line 388
    [09-Nov-2020 10:56:20 UTC] PHP Warning: substr() expects parameter 1 to be string, array given in /home/site/public_html/wp-content/plugins/litespeed-cache/src/css.cls.php on line 391

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    could you please edit this file

    /home/site/public_html/wp-content/plugins/litespeed-cache/src/utility.cls.php

    on line 707, you will see

    $url_parsed = parse_url( $url );

    please add this line ABOVE it

    error_log($url,3,”/home/site/public_html/lscwp.log”);

    then reproduce that error , and see what content is logged into lscwp.log ?

    Best regards,

    Thread Starter nir0ma

    (@nir0ma)

    Hi,
    Here is the log :

    https://domain.com/wp-content/themes/themename/custom.js
    https://c0.wp.com/p/jetpack/9.0.2/_inc/build/photon/photon.min.js
    https://c0.wp.com/c/5.5.3/wp-includes/js/wp-embed.min.js
    https://c0.wp.com/c/5.5.3/wp-includes/js/comment-reply.min.js
    https://domain.com/wp-content/themes/themename/custom.js
    https://c0.wp.com/p/jetpack/9.0.2/_inc/build/photon/photon.min.js
    https://c0.wp.com/c/5.5.3/wp-includes/js/wp-embed.min.js
    https://c0.wp.com/c/5.5.3/wp-includes/js/comment-reply.min.js
    https://domain.com/wp-content/themes/themename/custom.js
    https://c0.wp.com/p/jetpack/9.0.2/_inc/build/photon/photon.min.js
    https://c0.wp.com/c/5.5.3/wp-includes/js/wp-embed.min.js
    https://c0.wp.com/c/5.5.3/wp-includes/js/comment-reply.min.js
    https://domain.com/wp-content/themes/themename/custom.js
    https://c0.wp.com/p/jetpack/9.0.2/_inc/build/photon/photon.min.js
    https://c0.wp.com/c/5.5.3/wp-includes/js/wp-embed.min.js
    https://c0.wp.com/c/5.5.3/wp-includes/js/comment-reply.min.js
    https://domain.com/wp-content/themes/themename/custom.js
    https://c0.wp.com/p/jetpack/9.0.2/_inc/build/photon/photon.min.js
    https://c0.wp.com/c/5.5.3/wp-includes/js/wp-embed.min.js
    https://domain.com/wp-content/themes/themename/custom.js
    https://c0.wp.com/p/jetpack/9.0.2/_inc/build/photon/photon.min.js
    https://c0.wp.com/c/5.5.3/wp-includes/js/wp-embed.min.js
    https://c0.wp.com/c/5.5.3/wp-includes/js/comment-reply.min.js
    https://domain.com/wp-content/themes/themename/custom.js
    https://c0.wp.com/p/jetpack/9.0.2/_inc/build/photon/photon.min.js
    https://c0.wp.com/c/5.5.3/wp-includes/js/wp-embed.min.js
    https://c0.wp.com/c/5.5.3/wp-includes/js/comment-reply.min.js
    https://domain.com/wp-content/themes/themename/custom.js
    https://c0.wp.com/p/jetpack/9.0.2/_inc/build/photon/photon.min.js
    https://c0.wp.com/c/5.5.3/wp-includes/js/wp-embed.min.js
    https://c0.wp.com/c/5.5.3/wp-includes/js/comment-reply.min.js
    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    well , sorry , the log is bit of mess and hard to determinate which round was it

    please change

    error_log($url,3,"/home/site/public_html/lscwp.log");

    to

    error_log("start\n",3,"/home/site/public_html/lscwp.log");
    error_log($url,3,"/home/site/public_html/lscwp.log");
    error_log("\nend",3,"/home/site/public_html/lscwp.log");

    clean up current lscwp.log file and repeat the process

    Best regards,

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I’m going to mark this topic “Resolved”, due to lack of activity.

    If you still need help, please feel free to re-open it.

    Best regards,

    I’ve got the same errors being logged over and over too:

    [29-Nov-2020 12:30:24 UTC] PHP Warning:  strpos() expects parameter 1 to be string, array given in /home/website/public_html/wp-content/plugins/litespeed-cache/src/optimize.cls.php on line 227
    [29-Nov-2020 12:30:24 UTC] PHP Warning:  strpos() expects parameter 1 to be string, array given in /home/website/public_html/wp-content/plugins/litespeed-cache/src/optimize.cls.php on line 227
    [29-Nov-2020 12:30:24 UTC] PHP Warning:  strpos() expects parameter 1 to be string, array given in /home/website/public_html/wp-content/plugins/litespeed-cache/src/optimize.cls.php on line 231

    Running PHP v7.4, WP v5.5.3 & LiteSpeed Cache v3.5.2

    Same error here

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘PHP Warning in optimize.cls.php’ is closed to new replies.