From: Dmitry Stogov Date: Wed, 24 Mar 2004 13:16:07 +0000 (+0000) Subject: Fixed bug #27641 (Object cloning in ze1_compatibility_mode was reimplemented) X-Git-Tag: php-5.0.0RC2RC1~247 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7baa132194e636e86686ad2e65b7ab410f5f4990;p=php Fixed bug #27641 (Object cloning in ze1_compatibility_mode was reimplemented) --- diff --git a/NEWS b/NEWS index 0746cf5e0b..c2ff601052 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ????? 2004, PHP 5 Release Candidate 2 +- Fixed bug #27641 (Object cloning in ze1_compatibility_mode was reimplemented) + (Dmitry, Andi) - Changed sqlite's OO API to studlyCaps. (Marcus) - Fixed bug #27646 (Cannot serialize/unserialize non-finite numeric values). (Marcus) diff --git a/Zend/tests/bug27641.phpt b/Zend/tests/bug27641.phpt new file mode 100644 index 0000000000..f4042f933b --- /dev/null +++ b/Zend/tests/bug27641.phpt @@ -0,0 +1,42 @@ +--TEST-- +Bug #27641 (zend.ze1_compatibility_mode = On causes object properties to be misreported) +--SKIPIF-- + +--FILE-- +a = $a; + $this->b = $b; + } + function A() { + $args = func_get_args(); + call_user_func_array(Array(&$this, '__construct'), $args); + } + } + + $t = new A("New A", "New B"); + print_r($t); + print_r(get_class_vars(get_class($t))); + print_r(get_object_vars($t)); +?> +--EXPECTF-- +Strict Standards: Redefining already defined constructor for class A in %sbug27641.php on line %d +A Object +( + [a] => New A + [b] => New B +) +Array +( + [a] => Default for A + [b] => Default for B +) +Array +( + [a] => New A + [b] => New B +)