File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -269,13 +269,15 @@ public function isValid($document): bool
269269 break ;
270270
271271 case Database::VAR_INTEGER :
272+ // We need both Integer and Range because Range implicitly casts non-numeric values
272273 $ validators [] = new Integer ();
273274 $ max = $ size >= 8 ? Database::BIG_INT_MAX : Database::INT_MAX ;
274275 $ min = $ signed ? -$ max : 0 ;
275276 $ validators [] = new Range ($ min , $ max , Database::VAR_INTEGER );
276277 break ;
277278
278279 case Database::VAR_FLOAT :
280+ // We need both Float and Range because Range implicitly casts non-numeric values
279281 $ validators [] = new FloatValidator ();
280282 $ min = $ signed ? -Database::DOUBLE_MAX : 0 ;
281283 $ validators [] = new Range ($ min , Database::DOUBLE_MAX , Database::VAR_FLOAT );
You can’t perform that action at this time.
0 commit comments