im so sorry, should be in php5.4.
when i set a default value for the date_pop element, it always show blank.
i change the codes, it works for me.
on 330 row:
'#default_value' => (!empty($element['#value']['date']) || !empty($edit['date'])) && is_object($date) ? date_format_date($date, 'custom', $date_format) : '',
change to:
'#default_value' => (!empty($element['#value']) || !empty($edit['date'])) && is_object($date) ? date_format_date($date, 'custom', $date_format) : '',
on 372 row:
'#default_value' => (!empty($element['#value']['time']) || !empty($edit['time'])) && is_object($date) ? date_format_date($date, 'custom', $time_format) : '',
change to:
'#default_value' => (!empty($element['#value']) || !empty($edit['time'])) && is_object($date) ? date_format_date($date, 'custom', $time_format) : '',
are these bugs?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | date-default_value_not_set-1877310-1.patch | 1.37 KB | Anonymous (not verified) |
Comments
Comment #0.0
merryfreespace commentedformat message
Comment #1
Anonymous (not verified) commentedYes. I have the same problem. It is very interesting. I've procesed it into the patch.
It works well without patch on the site that uses PHP 5.2.
For PHP 5.4 we need the patch. It works but I can not imagine where it can cause a new problem.
Comment #2
ionmedia commentedthis patch works for me, please, add it to dev
Comment #4
Anonymous (not verified) commented#1: date-default_value_not_set-1877310-1.patch queued for re-testing.
Comment #6
brockfanning commentedComment #7
brockfanning commented#1: date-default_value_not_set-1877310-1.patch queued for re-testing.
Comment #7.0
brockfanning commentedchange the title
Comment #8
squarecandy commentedConfirming that this patch works for me. Thank you - saved my night!
As the title suggests, the issue arose for me after a server upgrade to PHP 5.4
Comment #9
squarecandy commentedNot sure why the patch isn't passing, but this should definitely get added to dev ASAP.
Comment #10
jsobiecki commentedIt's also works for me.
Comment #11
cafuego commentedThis seems to be a duplicate of #1808416: Date showing on node view - not showing on node edit - PHP 5.4 issue, which was fixed.