cvs: ZendEngine2(PHP_5_2) / zend_builtin_functions.c /tests bug41640.phpt php-src NEWS
| From: | Johannes Schl�ter | Date: | Sat, 09 Jun 2007 08:38:45 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_2) / zend_builtin_functions.c /tests bug41640.phpt php-src NEWS | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-5845@lists.php.net to get a copy of this message | ||
johannes Sat Jun 9 08:38:45 2007 UTC
Added files: (Branch: PHP_5_2)
/ZendEngine2/tests bug41640.phpt
Modified files:
/php-src NEWS
/ZendEngine2 zend_builtin_functions.c
Log:
Fix #41640 (get_class_vars produces error on class constants)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.771&r2=1.2027.2.547.2.772&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.771 php-src/NEWS:1.2027.2.547.2.772
--- php-src/NEWS:1.2027.2.547.2.771 Fri Jun 8 14:48:35 2007
+++ php-src/NEWS Sat Jun 9 08:38:44 2007
@@ -19,6 +19,8 @@
- Fixed money_format() not to accept multiple %i or %n tokens. (Stas, Ilia)
- Fixed PECL bug #11216 (crash in ZipArchive::addEmptyDir when a directory
already exists). (Pierre)
+- Fixed bug #41640 (get_class_vars produces error on class constants).
+ (Johannes)
- Fixed bug #41630 (segfault when an invalid color index is present in
the image data). (Reported by Elliot <wccoder@gmail dot com>) (Pierre)
- Fixed bug #41608 (segfault on a weird code with objects and switch()).
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_builtin_functions.c?r1=1.277.2.12.2.17&r2=1.277.2.12.2.18&diff_format=u
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.17
ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.18
--- ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.17 Mon Apr 16 08:09:54 2007
+++ ZendEngine2/zend_builtin_functions.c Sat Jun 9 08:38:44 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.17 2007/04/16 08:09:54 dmitry Exp $ */
+/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.18 2007/06/09 08:38:44 johannes Exp $ */
#include "zend.h"
#include "zend_API.h"
@@ -770,8 +770,8 @@
RETURN_FALSE;
} else {
array_init(return_value);
- add_class_vars(*pce, &(*pce)->default_properties, return_value TSRMLS_CC);
zend_update_class_constants(*pce TSRMLS_CC);
+ add_class_vars(*pce, &(*pce)->default_properties, return_value TSRMLS_CC);
add_class_vars(*pce, CE_STATIC_MEMBERS(*pce), return_value TSRMLS_CC);
}
}
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug41640.phpt?view=markup&rev=1.1
Index: ZendEngine2/tests/bug41640.phpt
+++ ZendEngine2/tests/bug41640.phpt
--TEST--
Bug #41640 (get_class_vars produces error on class constants)
--FILE--
<?php
class foo {
const FOO = 1;
public $x = self::FOO;
}
var_dump(get_class_vars("foo"));
--EXPECT--
array(1) {
["x"]=>
int(1)
}