Attempt to modify property of non-object

alex_andrascu - October 24, 2009 - 15:13
Project:Calendar
Version:6.x-2.2
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:reviewed & tested by the community
Description

warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_page.inc on line 47.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_page.inc on line 48.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_page.inc on line 49.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_page.inc on line 50.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_page.inc on line 51.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_page.inc on line 52.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_page.inc on line 53.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_page.inc on line 54.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_page.inc on line 55.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_block.inc on line 50.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_block.inc on line 51.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_block.inc on line 52.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_block.inc on line 53.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_block.inc on line 54.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_block.inc on line 55.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_block.inc on line 56.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_block.inc on line 57.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_block.inc on line 58.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 164.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 165.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 166.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 167.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 164.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 165.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 166.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 167.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 164.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 165.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 166.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 167.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 164.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 165.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 166.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 167.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 164.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 165.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 166.
warning: Attempt to modify property of non-object in E:\xampp\htdocs\amater\sites\all\modules\calendar\includes\calendar_plugin_display_attachment.inc on line 167.

That's what i've got with Calendar 2.2 and Date 2.4. Related thread here http://drupal.org/node/549884 . I've aplied patch no.10 and the warning was gone without the calendar module. I'm not going to apply the same fix in all of those files so i'm looking up and forward for a commiter :)

Thanks
Alex

#1

Rosamunda - November 1, 2009 - 14:52

+1!

#2

ywpeng - November 5, 2009 - 07:37

+2

#3

c.ex - November 10, 2009 - 17:50

I'm currently trying a more robust fix for the related issue in the date module - as others have pointed out, I'm almost certain this only has to do with PHP 5.3.0 suddenly realizing that treating the passed array as an object makes little sense, and it just went unnoticed until now. :] If it works as expected, I'd be happy to roll a patch for review, since I need this fix for my own installs one way or the other.

#4

alex_andrascu - November 10, 2009 - 19:37

I'd be happy to test that patch :)

#5

c.ex - November 10, 2009 - 20:06
Status:active» needs review

Just tested the following; everything seems to be in order on my installs, running PHP 5.3.0. Review and feedback welcome!

AttachmentSize
calendar-6.x-2.2-613528-5.patch 4.04 KB

#6

andrewfn - November 14, 2009 - 17:26

Just applied it to 12 production sites and it has saved my skin. Thanks so much!
I also recommend setting the value of date.timezone in php.ini which gets rid of some of the php 5.3 error messages.

#7

drjagan - November 17, 2009 - 09:38

Please somebody explain how to apply this patch??
SHould I upload to my server and run it from somewhere?

Please let me know.
THank you.
Jag

#8

c.ex - November 17, 2009 - 14:25

Glad I could help, Andrew! :] Good call on the date.timezone issue; forgot to make a mention of that...

Jag, have a look at http://drupal.org/patch/apply for instructions on how to apply patches. If you do, let us know here how it works out for you!

#9

WSRyu - November 18, 2009 - 17:59

Hey, thnx for the info, im also a new-user.
The patch will most likely not help me with this error would it?

An error occurred at /drupal-6_14/admin/build/views/ajax/display/date_browser/default/style_plugin.

I just ignore all the errors as mentioned above and continued building the calendar. When i go to
localhost/drupal-6_14/admin/build/views/edit/date_browser

and i want to change the Style, i get this error, actually with whatever i click...

An error occurred at /drupal-6_14/admin/build/views/ajax/config-item/date_browser/default/argument/date_argument.

Will the patch help? probably not as it only ignores the error right?
thnx for any help!

#10

Ninja Overlord - November 19, 2009 - 21:03

This patch works for me, though I haven't looked at the code itself.

#11

c.ex - November 19, 2009 - 22:00

All the patch does is treat the array as an array rather than an object, now enforced by PHP 5.3.0.

Someone else care to RTBC this?

#12

andrewfn - November 21, 2009 - 21:45
Status:needs review» reviewed & tested by the community

The code looks good. (Have tested it as well). RTBC.

#13

WSRyu - November 22, 2009 - 18:06

Nope, patch doesn´t work for me! this is the error i get upon clickin on save.

Parse error: parse error in C:\wamp\www\drupal-6_14\sites\all\modules\calendar\includes\calendar_plugin_display_page.inc on line 47

i edited the patch by hand and im pretty sure i did exactly as the patch mentioned.
any ideas?

#14

c.ex - November 22, 2009 - 23:13

The parse error above suggests that there's a missing semicolon or somesuch - that is, that the patch wasn't applied correctly. A quick Google will be able to tell you the common culprits. Please follow the steps at drupal.org/patch/apply, preferably using the command line (or similar). Applying patches manually is typically frowned upon, due to the human error that can result. If there is still a bug, I'd be happy to investigate.

Thanks!

#15

dbarkman - November 23, 2009 - 06:09

Ran the patch and it worked great! Thanks

#16

WSRyu - November 25, 2009 - 09:55

Hey c.ex,

thanks a lot, it does indeed work, sorry bout that! But i still get an error on my homepage:

An error occurred at /drupal-6_14/admin/build/views/ajax/display/date_browser/default/style_plugin.

Any ideas on that?

#17

c.ex - November 25, 2009 - 20:50

WSRyu -

Glad I could help! This patch was only intended to fix the above notices. I'd go ahead and create a new support ticket in the appropriate issue queue. The guide at http://drupal.org/node/314185 contains a lot of useful information on how to do this - it's easy to say there's something wrong, but being able to communicate exactly what the issue is (and how to duplicate it) makes life much easier on us devs.

HTH!

 
 

Drupal is a registered trademark of Dries Buytaert.