From 078fda3d6ecf6fd03a36f0100881023ec855f21e Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Tue, 19 Dec 2006 15:01:05 +0000 Subject: remove NOP code in json_determine_array_type(), as we already know the zval passed is an array (based on patch by Ron Korving) --- ext/json/json.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'ext/json/json.c') diff --git a/ext/json/json.c b/ext/json/json.c index e1943df847..84d5aa056c 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -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) { -- cgit v1.2.1