When modify a comment the date timestamps sets to 0. Some body like 1970?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | comment_form_validate.patch | 540 bytes | svemir |
When modify a comment the date timestamps sets to 0. Some body like 1970?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | comment_form_validate.patch | 540 bytes | svemir |
Comments
Comment #1
svemir commentedThe 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.
Comment #2
Cvbge commentedPlease see also http://drupal.org/node/40762 it seems it fixes this too (but I'm not sure?)
Comment #3
Wesley Tanaka commentedComment #4
Wesley Tanaka commentedindeed 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.