Fixed FormBuilder selectMonth. mktime() fails on the 31st of a month when the day is null.
See http://www.php.net/manual/en/function.mktime.php#99707
This commit is contained in:
1 parent
07eb181c23
commit
3809fee0a7
1 file changed
+1
-1
+1
-1
@@ -455,7 +455,7 @@ class FormBuilder {
|
|||||||
|
|
||||||
foreach (range(1, 12) as $month)
|
foreach (range(1, 12) as $month)
|
||||||
{
|
{
|
||||||
$months[$month] = strftime('%B', mktime(0, 0, 0, $month));
|
$months[$month] = strftime('%B', mktime(0, 0, 0, $month, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->select($name, $months, $selected, $options);
|
return $this->select($name, $months, $selected, $options);
|
||||||
|
|||||||
Reference in new issue
Block a user