mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Cleanup from previous commit.
Refs #GH-1352
This commit is contained in:
parent
dc3f9113b0
commit
68db74d32d
2 changed files with 18 additions and 20 deletions
|
@ -6631,9 +6631,8 @@ class FormHelperTest extends CakeTestCase {
|
|||
/**
|
||||
* testInputDateMaxYear method
|
||||
*
|
||||
* Let's say we want to only allow users born from
|
||||
* 2006 to 2008 to register
|
||||
* This beeing the first singup page, we still don't have any data
|
||||
* Let's say we want to only allow users born from 2006 to 2008 to register
|
||||
* This being the first singup page, we still don't have any data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
@ -2359,10 +2359,9 @@ class FormHelper extends AppHelper {
|
|||
}
|
||||
|
||||
if ($attributes['value'] === null && $attributes['empty'] != true) {
|
||||
$attributes['value'] = time();
|
||||
if (!empty($attributes['maxYear']) && $attributes['maxYear'] < date('Y')) {
|
||||
$attributes['value'] = strtotime(date($attributes['maxYear'] . '-m-d'));
|
||||
} else {
|
||||
$attributes['value'] = time();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue