]> granicus.if.org Git - php/commitdiff
- MFH: Fix #37923 (Display constant value in reflection::export)
authorJohannes Schlüter <johannes@php.net>
Mon, 11 Sep 2006 17:08:42 +0000 (17:08 +0000)
committerJohannes Schlüter <johannes@php.net>
Mon, 11 Sep 2006 17:08:42 +0000 (17:08 +0000)
NEWS
ext/reflection/php_reflection.c

diff --git a/NEWS b/NEWS
index 647c082f4530c916d9ee3a85a92efc33dd2c859f..e64480161c67fa69d6b02625ed29fb6db6321041 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,7 @@
   (php_lists at realplain dot com, Ilia)
 - Fixed bug #38096 (large timeout values ignored on 32bit machines in
   stream_socket_accept() and stream_socket_client()). (Ilia)
+- Fixed bug #37923 (Display constant value in reflection::export). (Johannes)
 
 31 Aug 2006, PHP 5.2.0RC3
 - Updated PCRE to version 6.7. (Ilia)
index 483246a8cbdf13b58441ddb48197b7ae3c75050a..bd63658c8b6a4679afa67bb3b006e0ed74309544 100644 (file)
@@ -537,10 +537,23 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in
 /* {{{ _const_string */
 static void _const_string(string *str, char *name, zval *value, char *indent TSRMLS_DC)
 {
-       string_printf(str, "%s    Constant [ %s %s ] { }\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 %s ] { %s }\n",
                           indent,
                           zend_zval_type_name(value),
-                          name);
+                          name,
+                          Z_STRVAL_P(value));
+
+       if (use_copy) {
+               zval_dtor(value);
+       }
 }
 /* }}} */