Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ PHP NEWS
the unsigned long range instead of silently truncating them. (Weilin Du)
. Fixed GMP integer string parsing to reject strings containing NUL bytes
instead of silently truncating them. (Weilin Du)
. Fixed GMP error messages that referenced outdated parameter names.
(Weilin Du)

- Intl:
. Fixed grammatical issues in Normalizer invalid form and IntlCalendar time
Expand Down
6 changes: 3 additions & 3 deletions ext/gmp/gmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@ ZEND_FUNCTION(gmp_root)
}

if (nth % 2 == 0 && mpz_sgn(gmpnum_a) < 0) {
zend_argument_value_error(2, "must be odd if argument #1 ($a) is negative");
zend_argument_value_error(2, "must be odd if argument #1 ($num) is negative");
RETURN_THROWS();
}

Expand All @@ -1276,7 +1276,7 @@ ZEND_FUNCTION(gmp_rootrem)
}

if (nth % 2 == 0 && mpz_sgn(gmpnum_a) < 0) {
zend_argument_value_error(2, "must be odd if argument #1 ($a) is negative");
zend_argument_value_error(2, "must be odd if argument #1 ($num) is negative");
RETURN_THROWS();
}

Expand Down Expand Up @@ -1528,7 +1528,7 @@ ZEND_FUNCTION(gmp_random_range)

gmp_init_random();
if (mpz_cmp(gmpnum_max, gmpnum_min) <= 0) {
zend_argument_value_error(1, "must be less than argument #2 ($maximum)");
zend_argument_value_error(1, "must be less than argument #2 ($max)");
RETURN_THROWS();
}

Expand Down
6 changes: 3 additions & 3 deletions ext/gmp/tests/gmp_random_range.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ while (1) {
echo "Done\n";
?>
--EXPECT--
gmp_random_range(): Argument #1 ($min) must be less than argument #2 ($maximum)
gmp_random_range(): Argument #1 ($min) must be less than argument #2 ($maximum)
gmp_random_range(): Argument #1 ($min) must be less than argument #2 ($maximum)
gmp_random_range(): Argument #1 ($min) must be less than argument #2 ($max)
gmp_random_range(): Argument #1 ($min) must be less than argument #2 ($max)
gmp_random_range(): Argument #1 ($min) must be less than argument #2 ($max)
Done
2 changes: 1 addition & 1 deletion ext/gmp/tests/gmp_remroot.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ array(2) {
string(2) "19"
}
}
gmp_rootrem(): Argument #2 ($nth) must be odd if argument #1 ($a) is negative
gmp_rootrem(): Argument #2 ($nth) must be odd if argument #1 ($num) is negative
array(2) {
[0]=>
object(GMP)#%d (1) {
Expand Down
2 changes: 1 addition & 1 deletion ext/gmp/tests/gmp_root.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ object(GMP)#%d (1) {
["num"]=>
string(1) "3"
}
gmp_root(): Argument #2 ($nth) must be odd if argument #1 ($a) is negative
gmp_root(): Argument #2 ($nth) must be odd if argument #1 ($num) is negative
object(GMP)#%d (1) {
["num"]=>
string(1) "0"
Expand Down