diff options
| author | Bob Weinand <bobwei9@hotmail.com> | 2016-03-27 00:57:56 +0100 |
|---|---|---|
| committer | Bob Weinand <bobwei9@hotmail.com> | 2016-03-27 00:57:56 +0100 |
| commit | 9600ddbd1ac7ca0e81a5c6f3d033357a856e75c0 (patch) | |
| tree | d4e225e5ea51c2d604e62c21aa612e659ffbeb7c | |
| parent | b867bd1c8d00701c0952fca4ea5ef9af39f9bb07 (diff) | |
| parent | 4327370d1308eab3c611fc6994e67048a18f92ef (diff) | |
| download | php-git-9600ddbd1ac7ca0e81a5c6f3d033357a856e75c0.tar.gz | |
Merge remote-tracking branch 'origin/PHP-7.0'
| -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); } } |
