PHP_FLOAT_MIN provides the smallest positive float, not largest negative
This commit is contained in:
parent
c2f994a02e
commit
7624f97f0b
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue