mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
ext/gmp: Improve error message
This commit is contained in:
parent
71194ea767
commit
4719ef258f
3 changed files with 3 additions and 3 deletions
|
@ -866,7 +866,7 @@ static inline void _gmp_unary_opl(INTERNAL_FUNCTION_PARAMETERS, gmp_unary_opl_t
|
||||||
static bool gmp_verify_base(zend_long base, uint32_t arg_num)
|
static bool gmp_verify_base(zend_long base, uint32_t arg_num)
|
||||||
{
|
{
|
||||||
if (base && (base < 2 || base > GMP_MAX_BASE)) {
|
if (base && (base < 2 || base > GMP_MAX_BASE)) {
|
||||||
zend_argument_value_error(arg_num, "must be between 2 and %d", GMP_MAX_BASE);
|
zend_argument_value_error(arg_num, "must be 0 or between 2 and %d", GMP_MAX_BASE);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,6 @@ object(GMP)#1 (1) {
|
||||||
["num"]=>
|
["num"]=>
|
||||||
string(1) "6"
|
string(1) "6"
|
||||||
}
|
}
|
||||||
GMP::__construct(): Argument #2 ($base) must be between 2 and 62
|
GMP::__construct(): Argument #2 ($base) must be 0 or between 2 and 62
|
||||||
GMP::__construct(): Argument #1 ($num) is not an integer string
|
GMP::__construct(): Argument #1 ($num) is not an integer string
|
||||||
GMP::__construct(): Argument #1 ($num) is not an integer string
|
GMP::__construct(): Argument #1 ($num) is not an integer string
|
||||||
|
|
|
@ -37,7 +37,7 @@ object(GMP)#1 (1) {
|
||||||
string(8) "98765678"
|
string(8) "98765678"
|
||||||
}
|
}
|
||||||
string(8) "98765678"
|
string(8) "98765678"
|
||||||
gmp_init(): Argument #2 ($base) must be between 2 and 62
|
gmp_init(): Argument #2 ($base) must be 0 or between 2 and 62
|
||||||
gmp_init(): Argument #1 ($num) is not an integer string
|
gmp_init(): Argument #1 ($num) is not an integer string
|
||||||
gmp_init(): Argument #1 ($num) is not an integer string
|
gmp_init(): Argument #1 ($num) is not an integer string
|
||||||
gmp_init(): Argument #1 ($num) is not an integer string
|
gmp_init(): Argument #1 ($num) is not an integer string
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue