summaryrefslogtreecommitdiff
path: root/ext/json/json.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/json.c')
-rw-r--r--ext/json/json.c9
1 files changed, 1 insertions, 8 deletions
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) {