Wordpress LScache Plugin: Constant PHP Warnings from litespeed cache showing up in error.log
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hi guys, I keep getting the below PHP warnings in my error.log. Everythings seems to work okay at first sight, but my error.log is growing with this PHP warning showing up every few seconds or so. I am running WP 5.6 and latest litespeed cache version. Any ideas? Thanks [11-Jan-2021 00:06:26 Europe/Bucharest] PHP Warning: parse_url() expects parameter 1 to be string, array given in /home/aven/public_html/wp-includes/class-http.php on line 272 [11-Jan-2021 00:07:37 Europe/Bucharest] PHP Warning: strpos() expects parameter 1 to be string, array given in /home/aven/public_html/wp-content/plugins/litespeed-cache/src/optimize.cls.php on line 228 [11-Jan-2021 00:07:37 Europe/Bucharest] PHP Warning: strpos() expects parameter 1 to be string, array given in /home/aven/public_html/wp-content/plugins/litespeed-cache/src/optimize.cls.php on line 228 [11-Jan-2021 00:07:37 Europe/Bucharest] PHP Warning: strpos() expects parameter 1 to be string, array given in /home/aven/public_html/wp-content/plugins/litespeed-cache/src/optimize.cls.php on line 232 [11-Jan-2021 00:07:38 Europe/Bucharest] PHP Warning: parse_url() expects parameter 1 to be string, array given in /home/aven/public_html/wp-content/plugins/litespeed-cache/src/utility.cls.php on line 707 [11-Jan-2021 00:07:38 Europe/Bucharest] PHP Warning: parse_url() expects parameter 1 to be string, array given in /home/aven/public_html/wp-content/plugins/litespeed-cache/src/css.cls.php on line 388 [11-Jan-2021 00:07:38 Europe/Bucharest] PHP Notice: Array to string conversion in /home/aven/public_html/wp-content/plugins/litespeed-cache/src/css.cls.php on line 390 [11-Jan-2021 00:07:38 Europe/Bucharest] PHP Warning: substr() expects parameter 1 to be string, array given in /home/aven/public_html/wp-content/plugins/litespeed-cache/src/css.cls.php on line 391 Hi, okay , please edit that file /home/aven/public_html/wp-content/plugins/litespeed-cache/src/optimize.cls.php around line 228 , find public function remove_query_strings( $src ) if ( strpos( $src, _litespeed_rm_qs=0 ) || strpos( $src, /recaptcha ) ) return $src change it to public function remove_query_strings( $src ) error_log( start-mark , 3 , /home/aven/public_html/lscwp.log ) error_log($src, 3 , /home/aven/public_html/lscwp.log ) error_log( end-mark , 3 , /home/aven/public_html/lscwp.log ) if ( strpos( $src, _litespeed_rm_qs=0 ) || strpos( $src, /recaptcha ) ) return $src then trigger the error again then log should output more information by then Best regards, Hi, qtwrk, Ive changed above code and the lscwp.log files logs all css/js files like below and nothing else. Any thoughts? Thanks, Florin aventure https://aventurescu.ro/wp-includes/css/dist/block-library/style.min.css?ver=44a1153fde8b15db0affa7360115f1b2 end-mark aventure https://aventurescu.ro/wp-content/plugins/related-posts-by-taxonomy/includes/assets/css/styles.css?ver=44a1153fde8b15db0affa7360115f1b2 end-mark aventure https://aventurescu.ro/wp-content/plugins/ultimate-reviewer/public/css/public.css?ver=2.5.2 end-mark aventure https://aventurescu.ro/wp-content/plugins/ultimate-reviewer/public/fonts/font-awesome/css/font-awesome.min.css?ver=2.5.2 end-mark aventure https://aventurescu.ro/wp-content/plugins/google-analytics-for-wordpress/assets/css/frontend.min.css?ver=7.14.0 end-mark aventure https://aventurescu.ro/wp-content/plugins/search-filter-pro/public/assets/css/search-filter.min.css?ver=2.5.3 end-mark aventure https://fonts.googleapis.com/css?family=Open+Sans%3A400%2C400Italic%2C600%2C700%7CRoboto+Slab%7CMerriweather%3A300italic&subset=latin end-mark aventure https://aventurescu.ro/wp-content/themes/smart-mag/style.css?ver=3.2.0 end-mark aventure https://aventurescu.ro/wp-content/themes/smart-mag/css/responsive.css?ver=3.2.0 end-mark aventure https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css end-mark aventure https://aventurescu.ro/wp-includes/js/jquery/jquery.min.js?ver=3.5.1 end-mark aventure https://aventurescu.ro/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.3.2 end-mark aventure https://aventurescu.ro/wp-content/plugins/google-analytics-dashboard-for-wp/front/js/tracking-analytics-events.js?ver=5.3.10 end-mark aventure https://aventurescu.ro/wp-content/plugins/ultimate-reviewer/public/scripts/comment-filtering.js?ver=2.5.2 end-mark aventure https://aventurescu.ro/wp-content/plugins/advanced-ads/public/assets/js/advanced.min.js?ver=1.23.0 end-mark aventure https://aventurescu.ro/wp-content/plugins/advanced-ads-responsive/public/assets/js/script.js?ver=1.8.9 end-mark aventure https://aventurescu.ro/wp-content/plugins/search-filter-pro/public/assets/js/search-filter-build.min.js?ver=2.5.3 end-mark aventure https://aventurescu.ro/wp-content/plugins/search-filter-pro/public/assets/js/select2.min.js?ver=2.5.3 end-mark aventure https://aventurescu.ro/wp-content/plugins/advanced-ads-pro/assets/advanced-ads-pro.js?ver=2.6.2 end-mark Expand Reason: please use code button for proper formatting Hi, this is weird I would expect log shows up like start-mark .... end-mark but in your case aventure https://aventurescu.ro/wp-includes/css/dist/block-library/style.min.css?ver=44a1153fde8b15db0affa7360115f1b2 end-mark where did that aventure come from ? Hi qtwrk, Here is a copy of the log file: https://we.tl/t-i8nCJ5MVbO Not all of the lines have that /aventure. At around line 20000, it doesnt show up anymore. Just a lot of css and js files with start-mark and end-mark. What to do? Thanks, Florin Hi, do you have any plugin or theme come across with name aventure ? please try create a stage site, then disable all plugins and go with default theme , see how it goes I am thinking this might be some kind of conflict with other plugins Best regards, Hi qtwrk, aventure is my host folder. Thanks, Florin Hi, qtwrk, Its unlikely a plugin compatibility issue because this errors started after updating to 3.5.0. My plugins are the same. Ive tried disabling some of the older plugins, but nothing works. Any ideas? Thanks, Florin Hi, well, but that doesnt explain why the log output changed something must have changed that output, thats why I asked you to try on stage site with all other plugins disabled first , and see how it goes Best regards, Hi, Im going to mark this topic Resolved , due to lack of activity. If you still need help, please feel free to re-open it. When re-open it, please also change the topic status to not solved Best regards,
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference