From: Ilia Alshanetsky Date: Fri, 16 Feb 2007 03:41:56 +0000 (+0000) Subject: Fixed bug #40465 (Ensure that all PHP elements are printed by var_dump). X-Git-Tag: php-5.2.2RC1~388 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4a33a63ab620ccad295264e300743ebec37b5140;p=php Fixed bug #40465 (Ensure that all PHP elements are printed by var_dump). --- diff --git a/NEWS b/NEWS index b6dd3106e8..27423b49cd 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ PHP NEWS - Added tidyNode::getParent() method (John, Nuno) - Fixed bug #40467 (Partial SOAP request sent when XSD sequence or choice include minOccurs=0). (Dmitry) +- Fixed bug #40465 (Ensure that all PHP elements are printed by var_dump). + (wharmby at uk dot ibm dot com, Ilia) - Fixed bug #40455 (proc_open() uses wrong commandline when safe_mode_exec_dir is set). (Tony) - Fixed bug #40432 (strip_tags() fails with greater than in attribute). (Ilia) diff --git a/ext/standard/var.c b/ext/standard/var.c index 0a3477cd1d..98ea373560 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -51,12 +51,6 @@ static int php_array_element_dump(zval **zv, int num_args, va_list args, zend_ha if (hash_key->nKeyLength==0) { /* numeric key */ php_printf("%*c[%ld]=>\n", level + 1, ' ', hash_key->h); } else { /* string key */ - if (va_arg(args, int) && hash_key->arKey[0] == '\0') { - /* XXX: perhaps when we are inside the class we should permit access to - * private & protected values - */ - return 0; - } php_printf("%*c[\"", level + 1, ' '); PHPWRITE(hash_key->arKey, hash_key->nKeyLength - 1); php_printf("\"]=>\n"); @@ -149,7 +143,7 @@ PHPAPI void php_var_dump(zval **struc, int level TSRMLS_DC) php_element_dump_func = php_object_property_dump; head_done: if (myht) { - zend_hash_apply_with_arguments(myht, (apply_func_args_t) php_element_dump_func, 1, level, (Z_TYPE_PP(struc) == IS_ARRAY ? 0 : 1)); + zend_hash_apply_with_arguments(myht, (apply_func_args_t) php_element_dump_func, 1, level); } if (level > 1) { php_printf("%*c", level-1, ' ');