We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9292bf0 commit 2371e12Copy full SHA for 2371e12
ext/gmp/gmp.c
@@ -137,15 +137,15 @@ static bool gmp_zend_parse_arg_into_mpz_ex(
137
* but operator overloading with objects should behave as if a
138
* method was called, thus strict types should apply. */
139
if (!ZEND_ARG_USES_STRICT_TYPES()) {
140
- zend_long lval = 0;
141
if (is_operator && Z_TYPE_P(arg) == IS_NULL) {
142
return false;
143
}
144
- if (!zend_parse_arg_long_weak(arg, &lval, arg_num)) {
+ zend_opt_long result = zend_parse_arg_long_weak(arg, arg_num);
+ if (!result.has_value) {
145
146
147
148
- mpz_set_si(*destination_mpz_ptr, lval);
+ mpz_set_si(*destination_mpz_ptr, result.value);
149
150
return true;
151
0 commit comments