diff options
| -rw-r--r-- | Zend/zend_compile.c | 2 | ||||
| -rw-r--r-- | tests/classes/abstract_static.phpt | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 86b0013816..3cad82915a 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1080,7 +1080,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n fn_flags = 0; } if ((fn_flags & ZEND_ACC_STATIC) && (fn_flags & ZEND_ACC_ABSTRACT) && !(CG(active_class_entry)->ce_flags & ZEND_ACC_INTERFACE)) { - zend_error(E_COMPILE_ERROR, "Static function %s%s%s() cannot be abstract", is_method ? CG(active_class_entry)->name : "", is_method ? "::" : "", Z_STRVAL(function_name->u.constant)); + zend_error(E_STRICT, "Static function %s%s%s() should not be abstract", is_method ? CG(active_class_entry)->name : "", is_method ? "::" : "", Z_STRVAL(function_name->u.constant)); } function_token->u.op_array = CG(active_op_array); diff --git a/tests/classes/abstract_static.phpt b/tests/classes/abstract_static.phpt index 17449eb979..f25d7cff47 100644 --- a/tests/classes/abstract_static.phpt +++ b/tests/classes/abstract_static.phpt @@ -31,4 +31,6 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call to function show() -Fatal error: Static function fail::func() cannot be abstract in %s on line %d +Strict Standards: Static function fail::func() should not be abstract in %stests/classes/abstract_static.php(%d) : eval()'d code on line %d + +Fatal error: Class fail contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (fail::func) in %s/tests/classes/abstract_static.php(%d) : eval()'d code on line %d |
