Problem/Motivation
There are at least two PHP errors with PHP8.0:
Error: Attempt to modify property "did" on string in panels_flexible_create_renderer() (line 294 of ./panels/plugins/layouts/flexible/flexible.inc).
Error: Attempt to assign property "add_css" on string in theme_panels_flexible() (line 400 of ./panels/plugins/layouts/flexible/flexible.inc).
In PHP7.4 the error is not fatal and a bit different:
Warning: Creating default object from empty value in panels_flexible_create_renderer() (line 294 of ./panels/plugins/layouts/flexible/flexible.inc).
Steps to reproduce
Set a flexible layout as a node display. In this case, the $display variable is an empty string causing a PHP error with PHP8.0 because technically layout is not attached to a panels display
Proposed resolution
$display/$handler could be empty when a layout in being used directly from DS, so account or that
Remaining tasks
Provide a patch
User interface changes
None
API changes
None
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | panels-3310359-2.patch | 1.62 KB | taran2l |
Comments
Comment #2
taran2lComment #3
taran2lComment #4
joelpittetChanging this to a bug and adding it to the plan
Comment #5
joelpittet@Taran2L can you elaborate on the steps to reproduce this? I can't seem to get it to trigger. By "node display" do you mean
node_view?Comment #6
joelpittetComment #8
joelpittetI've committed this as I reviewed it and though I didn't reproduce it I feel it's quite safe