]> granicus.if.org Git - php/commitdiff
- Reverted fix for bug #51421
authorFelipe Pena <felipe@php.net>
Mon, 28 Jun 2010 16:37:57 +0000 (16:37 +0000)
committerFelipe Pena <felipe@php.net>
Mon, 28 Jun 2010 16:37:57 +0000 (16:37 +0000)
NEWS
Zend/tests/bug51421.phpt [deleted file]
Zend/zend_compile.c

diff --git a/NEWS b/NEWS
index e62f66612b2c77c5a1989e16ac57085311e237f1..0b7755c52cbce5529cee5256575e1c70207adf41 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -15,8 +15,6 @@ PHP                                                                        NEWS
   (Felipe)
 - Fixed bug #52115 (mysqli_result::fetch_all returns null, not an empty array).
   (Andrey)
-- Fixed bug #51421 (Abstract __construct constructor argument list not
-  enforced). (Felipe)
 - Fixed bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP >= 5.3). (Felipe)
 
 17 Jun 2010, PHP 5.3.3 RC1
diff --git a/Zend/tests/bug51421.phpt b/Zend/tests/bug51421.phpt
deleted file mode 100644 (file)
index 825012a..0000000
+++ /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
index ceb3f8584f65591cdb01a978dcd1c1d53060d842..ac9d6e4be7c1e1ed9fb9cd59479e4cea7c91c589 100644 (file)
@@ -2540,12 +2540,8 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
                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;
        }