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 636e0ed commit 4b2d9ffCopy full SHA for 4b2d9ff
ext/gmp/gmp.c
@@ -188,6 +188,24 @@ static bool gmp_zend_parse_arg_into_mpz_ex(
188
mpz_set_si(*destination_mpz_ptr, Z_LVAL_P(arg));
189
return true;
190
}
191
+
192
+ /* This function is also used by the do_operation object hook,
193
+ * but operator overloading with objects should behave as if a
194
+ * method was called, thus strict types should apply. */
195
+ if (!ZEND_ARG_USES_STRICT_TYPES()) {
196
+ zend_long lval = 0;
197
+ if (is_operator && Z_TYPE_P(arg) == IS_NULL) {
198
+ return false;
199
+ }
200
+ if (!zend_parse_arg_long_weak(arg, &lval, arg_num)) {
201
202
203
204
+ mpz_set_si(*destination_mpz_ptr, lval);
205
206
+ return true;
207
208
209
return false;
210
211
0 commit comments