mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Fixed bug #43323 (Wrong count abstract methods). (Felipe, Dmitry)
This commit is contained in:
parent
e0ca3b2424
commit
9770b3cb00
3 changed files with 24 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue