- π«π·France Grimreaper France π«π·
Hi,
Regarding https://www.php.net/manual/en/function.min.php:
Be careful when passing arguments of different types because min() can produce unpredictable results.
I checked, and yes the result's type of min() is inconsistent:
$a = min(1, 2); => 1 $b = min('1', '2'); => '1' $c = min(1, '2'); => 1 $d = min('1', 2); => '1' $e = min(TRUE, 1); => TRUE $f = min(1, TRUE); => 1 $g = min(FALSE, TRUE); => FALSE
So I am ok with the patch.
Merging. Thanks!
-
Grimreaper β
committed c6b6678c on 8.x-3.x authored by
BenStallings β
Issue #3316938 by BenStallings: Return value must be of type int, string...
-
Grimreaper β
committed c6b6678c on 8.x-3.x authored by
BenStallings β
- Issue was unassigned.
- Status changed to Fixed
over 1 year ago 1:03pm 16 February 2023 Automatically closed - issue fixed for 2 weeks with no activity.