Strict warning: Creating default object from empty value in template_preprocess_block_admin_display_form() (line 385 of /home/davereid/Projects/drupal-head/modules/block/block.admin.inc).

Comments

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new1.1 KB

Very simple patch fixes the warning. $variables['block_listing'][$region][$i] is a NULL value and needs to be initialized to new stdClass()

c960657’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm that there was previously a strict error, and that this is fixed by the patch.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

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

jwilson3’s picture

This strict warning also occurs in Drupal 6.19.

I can confirm that the one-line addition in the patch in #1 (applied by hand) solves the issue.

Any chance this could get into to D6 branch?

Is it appropriate to mark this issue with Status: "patch (to be ported)" I'm not totally sure what that state implies, so thought i'd ask first.

jwilson3’s picture

Version: 7.x-dev » 6.x-dev
Status: Closed (fixed) » Needs review
StatusFileSize
new1.11 KB

Backported to D6

jwilson3’s picture

StatusFileSize
new1.11 KB

Dropped the -D6 suffix from previous patch.

Status: Needs review » Needs work

The last submitted patch, 335621-block-admin-strict.patch, failed testing.

c960657’s picture

Status: Needs work » Needs review

Patch still applies. The testbot has an issue with D6 patches at the moment (#961172: All D6 Core patches are failing).

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm that this bug exists in D6 dev as of today, and that the above patch fixes the problem.

I can also confirm that the patch in #8 does apply (the test bot still has that issue).

dave reid’s picture

Also confirmed this fixes a strict notice for D6 core.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed, pushed.

Status: Fixed » Closed (fixed)

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