]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #44681 (Resources used as array keys get converted to 0)
authorMatt Wilmas <mattwil@php.net>
Fri, 9 May 2008 09:23:03 +0000 (09:23 +0000)
committerMatt Wilmas <mattwil@php.net>
Fri, 9 May 2008 09:23:03 +0000 (09:23 +0000)
Zend/zend_execute.c

index 4f7efea1c92447feaa2aff28099e553f0d4626ec..6b498e4f2c99f39abc26ceadad8fbc73c544219b 100644 (file)
@@ -833,13 +833,13 @@ fetch_string_dim:
                                }
                        }
                        break;
-               case IS_RESOURCE:
-                       zend_error(E_STRICT, "Resource ID#%ld used as offset, casting to integer (%ld)", Z_LVAL_P(dim), Z_LVAL_P(dim));
-                       /* Fall Through */
                case IS_DOUBLE:
                        index = (long)Z_DVAL_P(dim);
                        goto num_index;
 
+               case IS_RESOURCE:
+                       zend_error(E_STRICT, "Resource ID#%ld used as offset, casting to integer (%ld)", Z_LVAL_P(dim), Z_LVAL_P(dim));
+                       /* Fall Through */
                case IS_BOOL:
                case IS_LONG:
                        index = Z_LVAL_P(dim);