johannes Mon Sep 11 17:06:59 2006 UTC Modified files: /php-src/ext/reflection php_reflection.c Log: - Fix #37923 (Display constant value in reflection::export) http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.252&r2=1.253&diff_format=u Index: php-src/ext/reflection/php_reflection.c diff -u php-src/ext/reflection/php_reflection.c:1.252 php-src/ext/reflection/php_reflection.c:1.253 --- php-src/ext/reflection/php_reflection.c:1.252 Sun Sep 10 13:35:32 2006 +++ php-src/ext/reflection/php_reflection.c Mon Sep 11 17:06:59 2006 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_reflection.c,v 1.252 2006/09/10 13:35:32 bjori Exp $ */ +/* $Id: php_reflection.c,v 1.253 2006/09/11 17:06:59 johannes Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -530,10 +530,23 @@ /* {{{ _const_string */ static void _const_string(string *str, char *name, zval *value, char *indent TSRMLS_DC) { - string_printf(str, "%s Constant [ %s %v ] { }\n", + zval value_copy; + int use_copy; + + zend_make_printable_zval(value, &value_copy, &use_copy); + if (use_copy) { + value = &value_copy; + } + + string_printf(str, "%s Constant [ %s %v ] { %s }\n", indent, zend_zval_type_name(value), - name); + name, + Z_STRVAL_P(value)); + + if (use_copy) { + zval_dtor(value); + } } /* }}} */ @@ -4867,7 +4880,7 @@ php_info_print_table_start(); php_info_print_table_header(2, "Reflection", "enabled"); - php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.252 2006/09/10 13:35:32 bjori Exp $"); + php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.253 2006/09/11 17:06:59 johannes Exp $"); php_info_print_table_end(); } /* }}} */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php