1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-14 10:45:54 +02:00

Fix PHP8 deprecation notice in InputfieldInteger

This commit is contained in:
Ryan Cramer
2023-09-29 07:59:34 -04:00
parent a1ebb5d0df
commit ec2777432d

View File

@@ -70,7 +70,7 @@ class InputfieldInteger extends Inputfield {
} else {
// input[type=number] unset any that aren't applicable
foreach(array('min', 'max', 'step') as $name) {
if(!strlen((string) $attrs[$name])) unset($attrs[$name]);
if(isset($attrs[$name]) && !strlen((string) $attrs[$name])) unset($attrs[$name]);
}
}