]> granicus.if.org Git - php/commitdiff
Fixed bug #40465 (Ensure that all PHP elements are printed by var_dump).
authorIlia Alshanetsky <iliaa@php.net>
Fri, 16 Feb 2007 03:41:56 +0000 (03:41 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 16 Feb 2007 03:41:56 +0000 (03:41 +0000)
NEWS
ext/standard/var.c

diff --git a/NEWS b/NEWS
index b6dd3106e834e5cc92ebb70c713b8ffb0ee1de41..27423b49cd6f76896999a50f0881aa5f87bc149e 100644 (file)
--- 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)
index 0a3477cd1d4e3d7c3d11f9a0cd5fc6aee7b03155..98ea3735605da8b3cd910b55489f3593da7a1996 100644 (file)
@@ -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, ' ');