From d94b067504dd949a52fb777fe0b505ab522a8682 Mon Sep 17 00:00:00 2001 From: Jim Zubov Date: Tue, 7 Feb 2017 09:19:16 -0500 Subject: [PATCH] The test scripts bug64720.phpt and bug68652.phpt were relying on the buggy behavior, when PHP returns "Undefined static property" error due to class entry corruption. With my fix for bug 74053, both tests return no errors now, I corrected the EXPECTF accordingly [Anybody please advice if I'm wrong?] Also created bug74053.phpt, for the code I mentioned in the bug description --- Zend/tests/bug64720.phpt | 5 ----- Zend/tests/bug68652.phpt | 7 ------- Zend/tests/bug74053.phpt | 43 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 12 deletions(-) create mode 100644 Zend/tests/bug74053.phpt diff --git a/Zend/tests/bug64720.phpt b/Zend/tests/bug64720.phpt index 45dee3e8c4..35b01e6a16 100644 --- a/Zend/tests/bug64720.phpt +++ b/Zend/tests/bug64720.phpt @@ -45,8 +45,3 @@ $bar = new Bar(); $bar->test(); ?> --EXPECTF-- -Fatal error: Uncaught Error: Access to undeclared static property: Stat::$requests in %sbug64720.php:12 -Stack trace: -#0 [internal function]: Stat->__destruct() -#1 {main} - thrown in %sbug64720.php on line 12 diff --git a/Zend/tests/bug68652.phpt b/Zend/tests/bug68652.phpt index 8e54af2e34..f0c9d5e9aa 100644 --- a/Zend/tests/bug68652.phpt +++ b/Zend/tests/bug68652.phpt @@ -37,10 +37,3 @@ class Bar { $foo = new Foo(); ?> --EXPECTF-- -Fatal error: Uncaught Error: Access to undeclared static property: Bar::$instance in %sbug68652.php:%d -Stack trace: -#0 %s(%d): Bar::getInstance() -#1 [internal function]: Foo->__destruct() -#2 {main} - thrown in %sbug68652.php on line %d - diff --git a/Zend/tests/bug74053.phpt b/Zend/tests/bug74053.phpt new file mode 100644 index 0000000000..e8fc02d387 --- /dev/null +++ b/Zend/tests/bug74053.phpt @@ -0,0 +1,43 @@ +--TEST-- +Bug #74053 (Corrupted class entries on shutdown when a destructor spawns another object) +--FILE-- + +--EXPECTF-- +a::destruct +b::destruct +a::destruct +b::destruct +a::destruct +b::destruct +a::destruct +b::destruct +a::destruct +b::destruct +a::destruct +b::destruct +a::destruct +b::destruct +a::destruct +b::destruct +a::destruct +b::destruct +a::destruct +b::destruct -- 2.40.0