]> granicus.if.org Git - php/commitdiff
remove NOP code in json_determine_array_type(), as we already know the zval passed...
authorNuno Lopes <nlopess@php.net>
Tue, 19 Dec 2006 15:01:05 +0000 (15:01 +0000)
committerNuno Lopes <nlopess@php.net>
Tue, 19 Dec 2006 15:01:05 +0000 (15:01 +0000)
ext/json/json.c

index e1943df847af16f9a60e3faf724f98dd4b82ff99..84d5aa056c0bd8431108e877420050239eba8e73 100644 (file)
@@ -91,14 +91,7 @@ static void json_escape_string(smart_str *buf, char *s, int len);
 
 static int json_determine_array_type(zval **val TSRMLS_DC) {
     int i;
-    HashTable *myht;
-
-    if (Z_TYPE_PP(val) == IS_ARRAY) {
-        myht = HASH_OF(*val);
-    } else {
-        myht = Z_OBJPROP_PP(val);
-        return 1;
-    }
+    HashTable *myht = HASH_OF(*val);
 
     i = myht ? zend_hash_num_elements(myht) : 0;
     if (i > 0) {