diff options
author | Dmitry Stogov <dmitry@php.net> | 2008-01-29 11:12:57 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2008-01-29 11:12:57 +0000 |
commit | 9770b3cb00fc015d05e21cb151642d37dace9d3d (patch) | |
tree | 101c644d9a1b8929b165b6f95a4620121b30627e /Zend/zend_execute_API.c | |
parent | e0ca3b2424f475fc940865ca8e8c011c498ec314 (diff) | |
download | php-git-9770b3cb00fc015d05e21cb151642d37dace9d3d.tar.gz |
Fixed bug #43323 (Wrong count abstract methods). (Felipe, Dmitry)
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r-- | Zend/zend_execute_API.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 6f816b8cab..b40901630a 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -1659,6 +1659,7 @@ check_fetch_type: typedef struct _zend_abstract_info { zend_function *afn[MAX_ABSTRACT_INFO_CNT + 1]; int cnt; + int ctor; } zend_abstract_info; static int zend_verify_abstract_class_function(zend_function *fn, zend_abstract_info *ai TSRMLS_DC) /* {{{ */ @@ -1667,7 +1668,16 @@ static int zend_verify_abstract_class_function(zend_function *fn, zend_abstract_ if (ai->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; } |