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

index 5ceaec8cd0e54c705098f7a3c852bdd82077661e..1d6a766a9644938015816bcb19e38e97866e24ff 100644 (file)
@@ -934,13 +934,13 @@ fetch_string_dim:
                                efree(offset_key.v);
                        }
                        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);