Skip to content

Commit b7925cb

Browse files
Girgiasnielsdos
andauthored
Use zend_compare
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
1 parent d18f9b2 commit b7925cb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ext/standard/array.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,9 @@ PHP_FUNCTION(min)
12801280
} else {
12811281
for (i = 1; i < argc; i++) {
12821282
generic_compare:
1283-
is_smaller_function(&result, &args[i], min);
1283+
if (zend_compare(&args[i], min) < 0) {
1284+
min = &args[i];
1285+
}
12841286
if (Z_TYPE(result) == IS_TRUE) {
12851287
min = &args[i];
12861288
}

0 commit comments

Comments
 (0)