]> granicus.if.org Git - php/commitdiff
Make use of abstract methods be E_STRICT rather then E_ERROR
authorIlia Alshanetsky <iliaa@php.net>
Fri, 20 Oct 2006 02:44:26 +0000 (02:44 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 20 Oct 2006 02:44:26 +0000 (02:44 +0000)
Zend/zend_compile.c
tests/classes/abstract_static.phpt

index 86b0013816aa7aa7f9965b200adad39af28843b3..3cad82915a4a6bf2815ad6a0f75d96f27c5e5d2f 100644 (file)
@@ -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);
index 17449eb979ec2f31a3877d73c4ba4bd7f2bdcb16..f25d7cff4778ab444fc977df3be7e3ea41a60f00 100644 (file)
@@ -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