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