diff options
author | Felipe Pena <felipe@php.net> | 2010-06-28 16:37:57 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2010-06-28 16:37:57 +0000 |
commit | 9a2a615af2d2d37c5274e605416320f4833196db (patch) | |
tree | bbd0c922addbee409ec16efa6b924aa18d4dac2a | |
parent | ec29c67a5a263241c758f783fcacbe070b39b81c (diff) | |
download | php-git-9a2a615af2d2d37c5274e605416320f4833196db.tar.gz |
- Reverted fix for bug #51421
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | Zend/tests/bug51421.phpt | 18 | ||||
-rw-r--r-- | Zend/zend_compile.c | 8 |
3 files changed, 2 insertions, 26 deletions
@@ -9,8 +9,6 @@ PHP NEWS - Fixed bug #52061 (memory_limit above 2G). (Felipe) - Fixed bug #52010 (open_basedir restrictions mismatch on vacuum command). (Ilia, Felipe) -- Fixed bug #51421 (Abstract __construct constructor argument list not - enforced). (Felipe) - Fixed bug #49730 (Firebird - new PDO() returns NULL). (Felipe) 17 Jun 2010, PHP 5.2.14RC1 diff --git a/Zend/tests/bug51421.phpt b/Zend/tests/bug51421.phpt deleted file mode 100644 index 825012a289..0000000000 --- a/Zend/tests/bug51421.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -Bug #51421 (Abstract __construct constructor argument list not enforced) ---FILE-- -<?php - -class ExampleClass {} - -abstract class TestInterface { - abstract public function __construct(ExampleClass $var); -} - -class Test extends TestInterface { - public function __construct() {} -} - -?> ---EXPECTF-- -Fatal error: Declaration of Test::__construct() must be compatible with that of TestInterface::__construct() in %s on line %d diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 22d91afbdb..551b385030 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -2017,12 +2017,8 @@ static zend_bool zend_do_perform_implementation_check(zend_function *fe, zend_fu return 1; } - /* Checks for constructors only if they are declared in an interface, - * or explicitly marked as abstract - */ - if ((fe->common.fn_flags & ZEND_ACC_CTOR) - && ((proto->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0 - && (proto->common.fn_flags & ZEND_ACC_ABSTRACT) == 0)) { + /* Checks for constructors only if they are declared in an interface */ + if ((fe->common.fn_flags & ZEND_ACC_CTOR) && (proto->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0) { return 1; } |