After upgrading to php 5.3 I started getting lots of errors like this:
Warning: Attempt to modify property of non-object in [site path]/modules/calendar/includes/calendar_plugin_display_page.inc
Warning: Attempt to modify property of non-object in [site path]/modules/calendar/includes/calendar_plugin_display_block.inc
Warning: Attempt to modify property of non-object in [site path]/modules/calendar/includes/calendar_plugin_display_attachment.inc
Based on a workaround for a related issue with Date (http://drupal.org/node/549884#comment-2067884) I have produced a patch file which simply wraps the offending code with this:
if (is_object($display)){
.....
}
This gets rid of the error messages, but doesn't address the real problem, which is why the code is trying to treat an array like an object. Simply deleting the offending lines may well have achieved the same thing but I don't know enough about the module to be sure
| Comment | File | Size | Author |
|---|---|---|---|
| calendar-6.x-2.x-dev.patch | 4.29 KB | drasgardian |
Comments
Comment #1
pyctures commentedHello,
I also have this problem.
Did you find another solution ?
Is it better to use PHP 5.2 ?
Thanks
Comment #2
drasgardian commentedThe patch has worked fine for me so far.
Comment #3
pyctures commentedThe patch also works for me...
Comment #4
arlinsandbulte commentedDuplicate of #613528: PHP 5.3 issue - Attempt to modify property of non-object (Calendar Module)
There is a patch and more discussion over there.
I will post a comment over there about the patch here, that may be helpful over there.