date_format() warning on line 356
| Project: | Mollom |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Dave Reid |
| Status: | fixed |
Jump to:
This may be the same issue as #463052: just leave a relase will fix this problem calendar.2.2 but I'm getting the error on different code lines (which may or may not be because I'm using the latest devs). I thought it safer to open a new issue.
- PHP 5.2.6
- Drupal 6.13
- CCK 6.x-2.x-dev July 21
- Date 6.x-2.x-dev June 21
- Mollom 6.x-1.9
On a fresh Drupal install, enable CCK and Date. Add a datetime field to the story content type, keep the field defaults. Submit a story as an authenticated user, it works perfectly.
Enable Mollom and set the story form to "Text analysis and CAPTCHA backup". Try to submit a story form, you'll get this warning:
warning: date_format() expects parameter 1 to be DateTime, null given in /var/www/vhosts/keeptrust.org/httpdocs/sites/all/modules/date/date/date.module on line 356.
warning: date_timezone_set() expects parameter 1 to be DateTime, null given in /var/www/vhosts/keeptrust.org/httpdocs/sites/all/modules/date/date/date.module on line 358.
warning: date_format() expects parameter 1 to be DateTime, null given in /var/www/vhosts/keeptrust.org/httpdocs/sites/all/modules/date/date/date.module on line 360.
warning: date_offset_get() expects parameter 1 to be DateTime, null given in /var/www/vhosts/keeptrust.org/httpdocs/sites/all/modules/date/date/date.module on line 362.
The node is created correctly.
Setting the form to "CAPTCHA only" makes the warning disappear.

#1
Greeting I have the same issue,
But in my case is when I tried to create a New Event, and when I clicked on Preview or Save I have the same warnings in date.module like above.
I tried to solve but only two things help me with this warnings:
One, I deactivate The mollom module, obviously, my event was created perfectly.
And two, Setting In Mollom settings on Protected Event Form with "No Protection".
Any help with this bug on Mollom??
Thanks!!
#2
I am also seeing same behaviour.
#3
Alright I think I saw this once on my local install. I'll try and do a little more debugging about this.
#4
We're seeing this on our site as well. We were assuming that it was a bug in the Date module, as thing start to go wrong in the date_formatter_process function. It took us a while to track it down to Mollom reviewing the field.
#5
I looked into this but I don't think it's a Mollom bug. It seems a bug outside of Mollom triggered by Mollom.
#6
This will be fixed in the upcoming version of Mollom. We no longer use node_rebuild().
#7