summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-10-20 02:44:26 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-10-20 02:44:26 +0000
commit3b1e2992643b6d249eb86bdd70340b08e1833e33 (patch)
tree52acd80422d8f699bc108f2558dbeade82d8c8af
parent304238654949375e1b63366a421350236260f8f6 (diff)
downloadphp-git-3b1e2992643b6d249eb86bdd70340b08e1833e33.tar.gz
Make use of abstract methods be E_STRICT rather then E_ERROR
-rw-r--r--Zend/zend_compile.c2
-rw-r--r--tests/classes/abstract_static.phpt4
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