Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've recently upgraded a site to PHP 5.4 and I'm now getting the following error upon viewing the calendar page:
Creating default object from empty value in .../modules/event/event.module on line 567.
Comment | File | Size | Author |
---|---|---|---|
#4 | 1920076-4.patch | 418 bytes | pwolanin |
#2 | event-fix_strict_error-1920076-2.patch | 526 bytes | cs_shadow |
#1 | event-fix-PHP-5.4-strict-error-1920076-1.patch | 641 bytes | jackalope |
Comments
Comment #1
jackalope CreditAttribution: jackalope commentedThe attached patch fixes the problem for me; it's only an error that I started seeing when the server started running PHP 5.4.
Comment #2
cs_shadow CreditAttribution: cs_shadow commentedThe patch in #1 fixes the issue though it was not correctly formatted. Attaching a properly formatted version of #1.
Comment #3
pwolanin CreditAttribution: pwolanin commentedThe $node object may be used earlier in the function for hook invocations, so it should be created higher up in the function I think.
Comment #4
pwolanin CreditAttribution: pwolanin commentedI think this is a slightly better fix - solves the error message for me, and creates $node above where it may be used in a hook
Comment #5
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedcommitted the last patch, thanks.