diff options
| -rw-r--r-- | Zend/tests/bug62358.phpt | 2 | ||||
| -rw-r--r-- | Zend/tests/bug69467.phpt | 2 | ||||
| -rw-r--r-- | Zend/tests/traits/bug60153.phpt | 2 | ||||
| -rw-r--r-- | Zend/zend_compile.c | 12 |
4 files changed, 9 insertions, 9 deletions
diff --git a/Zend/tests/bug62358.phpt b/Zend/tests/bug62358.phpt index 44480fc5ef..35bbc33835 100644 --- a/Zend/tests/bug62358.phpt +++ b/Zend/tests/bug62358.phpt @@ -23,4 +23,4 @@ class B extends A { } ?> --EXPECTF-- -Warning: Declaration of B::foo($var) should be compatible with A::foo() in %sbug62358.php on line %d +Fatal error: Declaration of B::foo($var) must be compatible with I::foo() in %sbug62358.php on line 17 diff --git a/Zend/tests/bug69467.phpt b/Zend/tests/bug69467.phpt index 22283003df..11ff72df18 100644 --- a/Zend/tests/bug69467.phpt +++ b/Zend/tests/bug69467.phpt @@ -18,4 +18,4 @@ $test = new Foo(); var_dump($test instanceof Baz); ?> --EXPECTF-- -Fatal error: Access level to Bar::bad() must be public (as in class Baz) in %sbug69467.php on line %d +Fatal error: Access level to Foo::bad() must be public (as in class Baz) in %sbug69467.php on line %d diff --git a/Zend/tests/traits/bug60153.phpt b/Zend/tests/traits/bug60153.phpt index 979eced1fb..8f01e72c2d 100644 --- a/Zend/tests/traits/bug60153.phpt +++ b/Zend/tests/traits/bug60153.phpt @@ -16,4 +16,4 @@ class C implements IFoo { } --EXPECTF-- -Fatal error: Declaration of TFoo::oneArgument() must be compatible with IFoo::oneArgument($a) in %s on line %d +Fatal error: Declaration of C::oneArgument() must be compatible with IFoo::oneArgument($a) in %s on line %d diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 64e0e0d1e3..2e1ce9ba44 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -5747,10 +5747,6 @@ void zend_compile_class_decl(zend_ast *ast) /* {{{ */ CG(active_class_entry) = ce; - if (implements_ast) { - zend_compile_implements(&declare_node, implements_ast); - } - zend_compile_stmt(stmt_ast); /* Reset lineno for final opcodes and errors */ @@ -5807,11 +5803,15 @@ void zend_compile_class_decl(zend_ast *ast) /* {{{ */ zend_emit_op(NULL, ZEND_BIND_TRAITS, &declare_node, NULL); } + if (implements_ast) { + zend_compile_implements(&declare_node, implements_ast); + } + if (!(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) - && (extends_ast || ce->num_interfaces > 0) + && (extends_ast || implements_ast) ) { zend_verify_abstract_class(ce); - if (ce->num_interfaces && !(ce->ce_flags & ZEND_ACC_IMPLEMENT_TRAITS)) { + if (implements_ast) { zend_emit_op(NULL, ZEND_VERIFY_ABSTRACT_CLASS, &declare_node, NULL); } } |
