lscache_wp icon indicating copy to clipboard operation
lscache_wp copied to clipboard

Call to undefined function LiteSpeed\json_decode

Open hosni opened this issue 1 year ago • 0 comments

I faced this error in my error_logs file, this is because in some environments PHP works strictly.

So, I suggest strict usage of PHP's functions, for ex:

json_decode(...);
to:
\json_decode(...);

Error trace:

[24-Jun-2024 08:50:25 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function LiteSpeed\json_decode() in /home/www/public_html/wp-content/plugins/litespeed-cache/src/root.cls.php:543
Stack trace:
#0 /home/www/public_html/wp-content/plugins/litespeed-cache/src/root.cls.php(455): LiteSpeed\Root::_maybe_decode('["Lighthouse","...')

#1 /home/www/public_html/wp-content/plugins/litespeed-cache/src/conf.cls.php(172): LiteSpeed\Root::get_option('guest_uas', Array)

#2 /home/www/public_html/wp-content/plugins/litespeed-cache/src/conf.cls.php(65): LiteSpeed\Conf->load_options()

#3 /home/www/public_html/wp-content/plugins/litespeed-cache/src/conf.cls.php(36): LiteSpeed\Conf->_conf_db_init()

#4 /home/www/public_html/wp-content/plugins/litespeed-cache/src/core.cls.php(50): LiteSpeed\Conf->init()

#5 /home/www/public_html/wp-content/plugins/litespeed-cache/src/root.cls.php(220): LiteSpeed\Core->__construct(false)

#6 /home/www/public_html/wp-content/plugins/litespeed-cache/litespeed-cache.php(186): LiteSpeed\Root::cls()
 in /home/www/public_html/wp-content/plugins/litespeed-cache/src/root.cls.php on line 543

hosni avatar Jul 02 '24 08:07 hosni