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?

CommentFileSizeAuthor
#1 date-default_value_not_set-1877310-1.patch1.37 KBAnonymous (not verified)

Comments

merryfreespace’s picture

Issue summary: View changes

format message

Anonymous’s picture

Title: Date Popup can't work on php 6.4 » Date pop-up can't work on php 5.4
StatusFileSize
new1.37 KB

Yes. 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.

ionmedia’s picture

Status: Active » Reviewed & tested by the community

this patch works for me, please, add it to dev

Status: Reviewed & tested by the community » Needs work

The last submitted patch, date-default_value_not_set-1877310-1.patch, failed testing.

Anonymous’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, date-default_value_not_set-1877310-1.patch, failed testing.

brockfanning’s picture

Version: 6.x-2.9 » 6.x-2.x-dev
brockfanning’s picture

Status: Needs work » Needs review
brockfanning’s picture

Issue summary: View changes

change the title

squarecandy’s picture

Title: Date pop-up can't work on php 5.4 » Date pop-up broken on php 5.4, existing values blank on edit
Issue summary: View changes

Confirming 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

squarecandy’s picture

Status: Needs review » Reviewed & tested by the community

Not sure why the patch isn't passing, but this should definitely get added to dev ASAP.

jsobiecki’s picture

It's also works for me.

cafuego’s picture

Status: Reviewed & tested by the community » Closed (duplicate)