When modify a comment the date timestamps sets to 0. Some body like 1970?

CommentFileSizeAuthor
#1 comment_form_validate.patch540 bytessvemir

Comments

svemir’s picture

Status: Active » Needs review
StatusFileSize
new540 bytes

The problem seems to be that function "comment_form_validate" receives $form_values by value (not as a reference.) It then calls "comment_validate" on $form_values. Validate correctly calculates the timestamp from the date, but since form_values came in as a copy, the timestamp never gets back into the original array. Patch attached.

Cvbge’s picture

Please see also http://drupal.org/node/40762 it seems it fixes this too (but I'm not sure?)

Wesley Tanaka’s picture

Status: Needs review » Closed (duplicate)
Wesley Tanaka’s picture

indeed a dupe of http://drupal.org/node/40762

by the way, comments i've heard from chx led me to believe that validate methods (at least the ones in core) shouldn't be changing form values.