MFB: little cleanup in json_determine_array_type()

This commit is contained in:
Nuno Lopes 2006-12-19 15:01:57 +00:00
parent 7a965d5b5f
commit 3945428c9f

View File

@ -84,14 +84,7 @@ static void json_escape_string(smart_str *buf, zstr s, int len, zend_uchar type)
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) {