Fixed bug #27641 (Object cloning in ze1_compatibility_mode was reimplemented)

This commit is contained in:
Dmitry Stogov 2004-03-24 13:16:07 +00:00
parent ec53815b0f
commit 7baa132194
2 changed files with 44 additions and 0 deletions

2
NEWS
View File

@ -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)

42
Zend/tests/bug27641.phpt Normal file
View File

@ -0,0 +1,42 @@
--TEST--
Bug #27641 (zend.ze1_compatibility_mode = On causes object properties to be misreported)
--SKIPIF--
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 is needed'); ?>
--FILE--
<?php
class A {
public $a = "Default for A";
public $b = "Default for B";
function __construct($a, $b) {
$this->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
)