From 9770b3cb00fc015d05e21cb151642d37dace9d3d Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 29 Jan 2008 11:12:57 +0000 Subject: [PATCH] Fixed bug #43323 (Wrong count abstract methods). (Felipe, Dmitry) --- NEWS | 1 + Zend/tests/bug43323.phpt | 12 ++++++++++++ Zend/zend_execute_API.c | 12 +++++++++++- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 Zend/tests/bug43323.phpt diff --git a/NEWS b/NEWS index e9e3d1ec8e7..e2ba3d7b2c3 100644 --- a/NEWS +++ b/NEWS @@ -106,6 +106,7 @@ PHP NEWS - Fixed bug #43527 (DateTime created from a timestamp reports environment timezone). (Derick) - Fixed bug #43426 (crash on nested call_user_func() calls). (Dmitry) +- Fixed bug #43323 (Wrong count abstract methods). (Felipe, Dmitry) - Fixed bug #43075 (Support 2007-11-01T24:00:00+00:00). (Derick) - Fixed bug #43003 (Invalid timezone reported for DateTime objects constructed using a timestamp). (Derick) diff --git a/Zend/tests/bug43323.phpt b/Zend/tests/bug43323.phpt new file mode 100644 index 00000000000..d366a6dd1ff --- /dev/null +++ b/Zend/tests/bug43323.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #43323 (Wrong count abstract methods) +--FILE-- +cnt < MAX_ABSTRACT_INFO_CNT) { ai->afn[ai->cnt] = fn; } - ai->cnt++; + if (fn->common.fn_flags & ZEND_ACC_CTOR) { + if (!ai->ctor) { + ai->cnt++; + ai->ctor = 1; + } else { + ai->afn[ai->cnt] = NULL; + } + } else { + ai->cnt++; + } } return 0; }