I'm getting a notice on editing a Panel variant content.

Notice: Trying to access array offset on value of type null in panels_renderer_editor->get_style() (line 1152 of panels/plugins/display_renderers/panels_renderer_editor.class.php).

The problem seems to be on the display_renderer plugin, on the get_style function when there in certain cases there is not a valid $type value and makes the switch statement not evaluate, and thus the $style variable being undefined (null).

I've added a little extra clause at the beginning of the if statement to check if the key we are trying to access is actually set. That seems to fix the notice.

Comments

jplana created an issue. See original summary.

jplana’s picture

Issue summary: View changes
StatusFileSize
new757 bytes

  • joelpittet committed 0f6f869 on 7.x-3.x authored by jplana
    Issue #3154958 by jplana: Notice: Trying to access array offset on value...
jplana’s picture

Assigned: jplana » Unassigned
joelpittet’s picture

Status: Needs review » Fixed

The MySQL 8 error above is not of concern, thanks @jplana, I've committed this to the dev release for the next stable

Status: Fixed » Closed (fixed)

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