Skip to content

Commit 4719ef2

Browse files
committed
ext/gmp: Improve error message
1 parent 71194ea commit 4719ef2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

ext/gmp/gmp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ static inline void _gmp_unary_opl(INTERNAL_FUNCTION_PARAMETERS, gmp_unary_opl_t
866866
static bool gmp_verify_base(zend_long base, uint32_t arg_num)
867867
{
868868
if (base && (base < 2 || base > GMP_MAX_BASE)) {
869-
zend_argument_value_error(arg_num, "must be between 2 and %d", GMP_MAX_BASE);
869+
zend_argument_value_error(arg_num, "must be 0 or between 2 and %d", GMP_MAX_BASE);
870870
return false;
871871
}
872872

ext/gmp/tests/construct.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ object(GMP)#1 (1) {
4646
["num"]=>
4747
string(1) "6"
4848
}
49-
GMP::__construct(): Argument #2 ($base) must be between 2 and 62
49+
GMP::__construct(): Argument #2 ($base) must be 0 or between 2 and 62
5050
GMP::__construct(): Argument #1 ($num) is not an integer string
5151
GMP::__construct(): Argument #1 ($num) is not an integer string

ext/gmp/tests/gmp_init.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ object(GMP)#1 (1) {
3737
string(8) "98765678"
3838
}
3939
string(8) "98765678"
40-
gmp_init(): Argument #2 ($base) must be between 2 and 62
40+
gmp_init(): Argument #2 ($base) must be 0 or between 2 and 62
4141
gmp_init(): Argument #1 ($num) is not an integer string
4242
gmp_init(): Argument #1 ($num) is not an integer string
4343
gmp_init(): Argument #1 ($num) is not an integer string

0 commit comments

Comments
 (0)