date_format() warning on line 356

Edith Illyes - July 21, 2009 - 10:09
Project:Mollom
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Dave Reid
Status:fixed
Description

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

Axol00 - October 27, 2009 - 17:34

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

eft - November 16, 2009 - 05:54

I am also seeing same behaviour.

#3

Dave Reid - November 17, 2009 - 16:09
Version:6.x-1.9» 6.x-1.x-dev
Assigned to:Anonymous» Dave Reid

Alright I think I saw this once on my local install. I'll try and do a little more debugging about this.

#4

mikemccaffrey - December 5, 2009 - 02:04

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

Dries - December 5, 2009 - 03:07

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

Dries - December 6, 2009 - 18:45

This will be fixed in the upcoming version of Mollom. We no longer use node_rebuild().

#7

Dries - December 6, 2009 - 18:45
Status:active» fixed
 
 

Drupal is a registered trademark of Dries Buytaert.