johannes                Mon Sep 11 17:08:43 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src    NEWS 
    /php-src/ext/reflection     php_reflection.c 
  Log:
  - MFH: Fix #37923 (Display constant value in reflection::export)
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.244&r2=1.2027.2.547.2.245&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.244 php-src/NEWS:1.2027.2.547.2.245
--- php-src/NEWS:1.2027.2.547.2.244     Mon Sep 11 14:52:20 2006
+++ php-src/NEWS        Mon Sep 11 17:08:42 2006
@@ -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)
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.22&r2=1.164.2.33.2.23&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.22 
php-src/ext/reflection/php_reflection.c:1.164.2.33.2.23
--- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.22     Sun Sep 10 
13:25:47 2006
+++ php-src/ext/reflection/php_reflection.c     Mon Sep 11 17:08:42 2006
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_reflection.c,v 1.164.2.33.2.22 2006/09/10 13:25:47 bjori Exp $ */
+/* $Id: php_reflection.c,v 1.164.2.33.2.23 2006/09/11 17:08:42 johannes Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -537,10 +537,23 @@
 /* {{{ _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);
+       }
 }
 /* }}} */
 
@@ -4799,7 +4812,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.164.2.33.2.22 2006/09/10 13:25:47 bjori Exp $");
+       php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 
1.164.2.33.2.23 2006/09/11 17:08:42 johannes Exp $");
 
        php_info_print_table_end();
 } /* }}} */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to