1
0
Fork 0
mirror of synced 2024-06-29 19:50:26 +12:00

PHP_FLOAT_MIN provides the smallest positive float, not largest negative

This commit is contained in:
kodumbeats 2021-11-01 20:48:14 -04:00
parent c2f994a02e
commit 7624f97f0b

View file

@ -994,7 +994,7 @@ App::post('/v1/database/collections/:collectionId/attributes/float')
/** @var Appwrite\Stats\Stats $usage */
// Ensure attribute default is within range
$min = (is_null($min)) ? PHP_FLOAT_MIN : \floatval($min);
$min = (is_null($min)) ? -PHP_FLOAT_MAX : \floatval($min);
$max = (is_null($max)) ? PHP_FLOAT_MAX : \floatval($max);
if ($min > $max) {