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 17a32a9 commit c2a90ccCopy full SHA for c2a90cc
ext/spl/spl_fixedarray.c
@@ -311,15 +311,15 @@ static zend_object *spl_fixedarray_object_clone(zend_object *old_object)
311
312
static zend_long spl_offset_convert_to_long(zval *offset) /* {{{ */
313
{
314
- zend_long index;
315
-
316
try_again:
317
switch (Z_TYPE_P(offset)) {
318
- case IS_STRING:
319
- if (IS_LONG == is_numeric_str_function(Z_STR_P(offset), &index, NULL)) {
320
- return index;
+ case IS_STRING: {
+ zend_ulong index;
+ if (ZEND_HANDLE_NUMERIC(Z_STR_P(offset), index)) {
+ return (zend_long) index;
321
}
322
break;
+ }
323
case IS_DOUBLE:
324
return zend_dval_to_lval_safe(Z_DVAL_P(offset));
325
case IS_LONG:
0 commit comments