With PHP8.x I get "An error has occurred. Attempt to assign property "id" on null"

#1
Hi,

Using Joomla 4 with PHP7.4 on a server with LiteSpeed and with the LiteSpeed plugin for Joomla, everything works fine.
But as soon as I switch to PHP8.x, I get the following error when I click on the "Publish Item / Unpublish Item" Icon on the Custom Fields List (namely on /administrator/index.php?option=com_fields&view=fields&context=com_content.article) :
"An error has occurred. Attempt to assign property "id" on null"

(if instead I *edit* the Custom Field and change its State and Save & Close, there is no error)
 
#4
Txs a lot for your suggestion!
I have applied the patch on line 209 but the error remains (the error message is a bit different from the one mentioned in that PR btw) :

An error has occurred.
0 Attempt to assign property "id" on null

That line 693 is the "$row->id = $pk;" in the following code

} else {
foreach ($pks as $pk) {
$row->id = $pk;
$this->purgeContent($context, $row);
}
}
 
#6
Really? Did you only modify affected code or did you update plugin? All other users state that the problem would have been fixed by the update.
Txs again for looking into this.
I already had version 1.5.1 for J4.
I uninstalled and reinstalled it (just in case)
Same result.
But the error mentions line 693

And my error message is
Attempt to assign property "id" on null
and not
Attempt to read property "id" on null
as mentionned on that other thread
 
Top