Commit 54d0948f authored by Dries's avatar Dries

- Patch #133189 by Darren Oh: fixed empty date field test.

parent 8630e5ed
...@@ -1187,7 +1187,7 @@ function theme_date($element) { ...@@ -1187,7 +1187,7 @@ function theme_date($element) {
*/ */
function expand_date($element) { function expand_date($element) {
// Default to current date // Default to current date
if (!isset($element['#value'])) { if (empty($element['#value'])) {
$element['#value'] = array('day' => format_date(time(), 'custom', 'j'), $element['#value'] = array('day' => format_date(time(), 'custom', 'j'),
'month' => format_date(time(), 'custom', 'n'), 'month' => format_date(time(), 'custom', 'n'),
'year' => format_date(time(), 'custom', 'Y')); 'year' => format_date(time(), 'custom', 'Y'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment