PHP Warning: Attempt to read property "id" on null

#1
I've been using LiteSpeed Cache for some time now and noticed the following warning in my server's error log:

PHP Warning: Attempt to read property "id" on null in public_html/plugins/system/lscache/lscache.php on line 203

Since yesterday I've got about 4500 lines with this error. Joomla LiteSpeed Cache v1.5.1 with Joomla! 3.10.11 and the server is running PHP 8.0

Any ideas what's causing the warning and how to resolve it?
 

serpent_driver

Well-Known Member
#2

serpent_driver

Well-Known Member
#7
Now I'm getting this:

Undefined array key "HTTP_USER_AGENT" in public_html/plugins/system/lscache/lscache.php on line 219
Same procedure as before. :)
This is the result of only limited PHP 8 compatibility, but without any significant functional consequences. You can either ignore this warning or use
PHP:
ini_set('ignore_repeated_errors', True);
to prevent the repeated writing of this warning until there is an update.
 
#8
Same procedure as before. :)
This is the result of only limited PHP 8 compatibility, but without any significant functional consequences. You can either ignore this warning or use
PHP:
ini_set('ignore_repeated_errors', True);
to prevent the repeated writing of this warning until there is an update.
Yep, I realise that, the information was for Wuhua Chen, who kindly updated the plugin to solve the first issue.
 

serpent_driver

Well-Known Member
#9
@DJBenz

It shouldn't surprise you if a similar problem occurs again after an update has fixed a problem. Just be consistent and report back if there are any new bugs. Unfortunately, the adjustments to PHP 8.x are tedious. With PHP 8.x, programmers should be guided to program more cleanly.
 
Top