mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
MFB: little cleanup in json_determine_array_type()
This commit is contained in:
parent
7a965d5b5f
commit
3945428c9f
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user