mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-08 12:32:42 +00:00
Fix year form field when magic input wrapper is used.
s
This commit is contained in:
parent
f925511a54
commit
a9ae7fd5bb
1 changed files with 5 additions and 0 deletions
|
@ -2213,6 +2213,11 @@ class FormHelper extends AppHelper {
|
|||
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper::year
|
||||
*/
|
||||
public function year($fieldName, $minYear = null, $maxYear = null, $attributes = array()) {
|
||||
if (is_array($minYear)) {
|
||||
$attributes = $minYear;
|
||||
$minYear = null;
|
||||
}
|
||||
|
||||
$attributes += array('empty' => true, 'value' => null);
|
||||
if ((empty($attributes['value']) || $attributes['value'] === true) && $value = $this->value($fieldName)) {
|
||||
if (is_array($value)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue