Fix for Warning: Creating default object from empty value in panels_renderer_legacy->render_pane() (line 243 of /Volumes/Sites/www/forallp.dev/sites/all/modules/contrib/panels/plugins/display_renderers/panels_renderer_legacy.class.php).

Comments

damienmckenna’s picture

Status: Patch (to be ported) » Needs review
Parent issue: » #1774796: Plan for Panels v6.x-3.11 release (PHP 5.4 fix)

Status: Needs review » Needs work

The last submitted patch, php_5_3+_notice.patch, failed testing.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new586 bytes

Rerolled with the proper path.

rjay’s picture

StatusFileSize
new806 bytes

The patch in #3 fixes the warning on line 243 of panels_renderer_legacy.class.php when attempting to add a CSS class when there is no content for a pane. The same warning can also happen on line 238 when trying to add a CSS id when there is no content. This patch fixes both warnings.

michelle’s picture

Could you provide steps to reproduce? Based on #4, I tried adding a pane via "new custom content" and didn't give it any content. I also tried adding a view pane that I knew returned no results nor empty text. Neither of them had errors either while I was adding the ID/class nor saving the page nor displaying the page. I'd be happy to try testing again if someone could provide the steps.

rjay’s picture

@Michelle: When you were testing did you confirm that there was a plugin that was forcing Panels to use the legacy renderer? Panels displays a message about this on the Status Report page for me. Also make sure you are running PHP >= 5.4 (this issue occured on PHP 5.6 for me).

In my case the issue occured with a pane that contained a view, which was returning no results and had no empty text (which was one of your test cases as well). The warning appeared for me when viewing the page, not while adding/editing the pane. I was using Views 6.x-2.x, though I'm not sure if that makes a difference.

michelle’s picture

I don't know how to get "a plugin that was forcing Panels to use the legacy renderer" so that was likely why I wasn't able to repro it.

japerry’s picture

Status: Needs review » Fixed

Works. fixed.

  • japerry committed ce046c9 on 6.x-3.x
    Issue #2355257 by rjay, DamienMcKenna, ptoly: Fix up more php 5.4...

Status: Fixed » Closed (fixed)

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