mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
parent
f97d8f9bb7
commit
4fdd5e5d45
1 changed files with 5 additions and 1 deletions
|
@ -1005,7 +1005,11 @@ class FormHelper extends AppHelper {
|
|||
}
|
||||
}
|
||||
|
||||
$autoLength = (!array_key_exists('maxlength', $options) && isset($fieldDef['length']));
|
||||
$autoLength = (
|
||||
!array_key_exists('maxlength', $options) &&
|
||||
isset($fieldDef['length']) &&
|
||||
is_scalar($fieldDef['length'])
|
||||
);
|
||||
if ($autoLength && $options['type'] == 'text') {
|
||||
$options['maxlength'] = $fieldDef['length'];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue