Skip to content
Snippets Groups Projects
Commit 854a520a authored by Karen Stevenson's avatar Karen Stevenson
Browse files

#113959, #114654 empty calendar not created for non-existant days, patch by Crell

parent 6f6850d9
No related branches found
Tags 5.x-1.2
No related merge requests found
......@@ -545,6 +545,7 @@ function _calendar_make_node($node = NULL, $timestamp = NULL, $offset = NULL, $y
$day = _calendar_is_valid($day, 'day') ? $day : gmdate('j', time());
$hour = _calendar_is_valid($hour, 'hour') ? $hour : gmdate('H', time());
$minute = _calendar_is_valid($minute, 'minute') ? $minute : gmdate('i', time());
while (!checkdate($month, $day, $year)) $day--; // Account for days that don't exist
$timestamp = gmmktime($hour, $minute, 0, $month, $day, $year);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment