@@ -541,26 +541,27 @@ static void build_trace_args(zval *arg, smart_str *str) /* {{{ */
541541
542542static void build_trace_args_list (zval * tmp , smart_str * str ) /* {{{ */
543543{
544- if (EXPECTED (Z_TYPE_P (tmp ) == IS_ARRAY )) {
545- zend_string * name ;
546- zval * arg ;
547- HashTable * ht = Z_ARRVAL_P (tmp );
548- uint32_t index = 0 ;
549-
550- ZEND_HASH_FOREACH_STR_KEY_VAL (ht , name , arg ) {
551- if (name ) {
552- smart_str_append (str , name );
553- smart_str_appends (str , ": " );
554- }
555- build_trace_args (arg , str );
556- if (++ index != zend_hash_num_elements (ht )) {
557- smart_str_appends (str , ", " );
558- }
559- } ZEND_HASH_FOREACH_END ();
560- } else {
544+ if (EXPECTED (Z_TYPE_P (tmp ) != IS_ARRAY )) {
561545 /* only happens w/ reflection abuse (Zend/tests/bug63762.phpt) */
562546 zend_error (E_WARNING , "args element is not an array" );
547+ return ;
563548 }
549+
550+ zend_string * name ;
551+ zval * arg ;
552+ HashTable * ht = Z_ARRVAL_P (tmp );
553+ uint32_t index = 0 ;
554+
555+ ZEND_HASH_FOREACH_STR_KEY_VAL (ht , name , arg ) {
556+ if (name ) {
557+ smart_str_append (str , name );
558+ smart_str_appends (str , ": " );
559+ }
560+ build_trace_args (arg , str );
561+ if (++ index != zend_hash_num_elements (ht )) {
562+ smart_str_appends (str , ", " );
563+ }
564+ } ZEND_HASH_FOREACH_END ();
564565}
565566/* }}} */
566567
0 commit comments