ID:               46273
 Updated by:       [EMAIL PROTECTED]
 Reported By:      serovov at gmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Scripting Engine problem
 Operating System: *
 PHP Version:      5.2CVS-2008-10-10 (snap)
 New Comment:

Can you provide a clear patch (in unified format, diff -u) as this 
report does not make any sense.


Previous Comments:
------------------------------------------------------------------------

[2008-10-10 22:39:17] serovov at gmail dot com

Description:
------------
I'm looked in code of var_export and found excess method call.
in ext/standart/var.c in method 


PHPAPI void php_var_export(zval **struc, int level TSRMLS_DC) /* {{{
*/


We hava a switch:


switch (Z_TYPE_PP(struc)) {


And little bottom we have a case for array(php5.*/6) line ~407:


                break;
        case IS_ARRAY:
                myht = Z_ARRVAL_PP(struc);
                if (level > 1) {
                        php_printf("\n%*c", level - 1, ' ');
                }
                PUTS ("array (\n");
                zend_hash_apply_with_arguments(myht TSRMLS_CC, 
(apply_func_args_t)
php_array_element_export, 1, level, (Z_TYPE_PP(struc) == IS_ARRAY ? 0 :
1));



And We see, that the "Z_TYPE_PP(struc)" is aleready and always
IS_ARRAY.
We must remove (Z_TYPE_PP(struc) == IS_ARRAY ? 0 : 1) and replace it to
"0".
Have a nice day =)




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=46273&edit=1

Reply via email to