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

CommentFileSizeAuthor
#2 panels-3310359-2.patch1.62 KBtaran2l

Comments

Taran2L created an issue. See original summary.

taran2l’s picture

StatusFileSize
new1.62 KB
taran2l’s picture

Status: Active » Needs review
joelpittet’s picture

Category: Support request » Bug report
Parent issue: » #3157069: Plan for Panels 7.x-3.11

Changing this to a bug and adding it to the plan

joelpittet’s picture

Status: Needs review » Postponed (maintainer needs more info)

@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?

joelpittet’s picture

  • joelpittet committed c1499ae2 on 7.x-3.x authored by Taran2L
    Issue #3310359 by Taran2L, joelpittet: Flexible layout used as a node...
joelpittet’s picture

Status: Postponed (maintainer needs more info) » Fixed

I've committed this as I reviewed it and though I didn't reproduce it I feel it's quite safe

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.