cvs: ZendEngine2(PHP_5_3) / zend_compile.c /tests magic_methods_002.phpt magic_methods_003.phpt magic_methods_004.phpt magic_methods_005.phpt
magic_methods_006.phpt magic_methods_007.phpt magic_methods_008.phpt magic_methods_009.phpt magic_methods_010.phpt

From: Date: Tue, 10 Jun 2008 23:09:09 +0000
Subject: cvs: ZendEngine2(PHP_5_3) / zend_compile.c /tests magic_methods_002.phpt magic_methods_003.phpt magic_methods_004.phpt magic_methods_005.phpt
magic_methods_006.phpt magic_methods_007.phpt magic_methods_008.phpt magic_methods_009.phpt magic_methods_010.phpt
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-6797@lists.php.net to get a copy of this message
felipe Tue Jun 10 23:09:09 2008 UTC Modified files: (Branch: PHP_5_3) /ZendEngine2 zend_compile.c /ZendEngine2/tests magic_methods_002.phpt magic_methods_003.phpt magic_methods_004.phpt magic_methods_005.phpt magic_methods_006.phpt magic_methods_007.phpt magic_methods_008.phpt magic_methods_009.phpt magic_methods_010.phpt Log: - Change E_COMPILE_ERROR to E_WARNING (for wrong visibility on magic methods)

http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.41.2.66&r2=1.647.2.27.2.41.2.67&diff_format=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.66 ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.67 --- ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.66 Tue Jun 3 18:11:11 2008 +++ ZendEngine2/zend_compile.c Tue Jun 10 23:09:08 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.66 2008/06/03 18:11:11 felipe Exp $ */ +/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.67 2008/06/10 23:09:08 felipe Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -1206,31 +1206,31 @@ if (CG(active_class_entry)->ce_flags & ZEND_ACC_INTERFACE) { if ((name_len == sizeof(ZEND_CALL_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_COMPILE_ERROR, "The magic method __call() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __call() must have public visibility and can not be static"); } } else if ((name_len == sizeof(ZEND_CALLSTATIC_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_CALLSTATIC_FUNC_NAME, sizeof(ZEND_CALLSTATIC_FUNC_NAME)-1))) { if ((fn_flags & (ZEND_ACC_PPP_MASK ^ ZEND_ACC_PUBLIC)) || (fn_flags & ZEND_ACC_STATIC) == 0) { - zend_error(E_COMPILE_ERROR, "The magic method __callStatic() must have public visibility and be static"); + zend_error(E_WARNING, "The magic method __callStatic() must have public visibility and be static"); } } else if ((name_len == sizeof(ZEND_GET_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_GET_FUNC_NAME, sizeof(ZEND_GET_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_COMPILE_ERROR, "The magic method __get() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __get() must have public visibility and can not be static"); } } else if ((name_len == sizeof(ZEND_SET_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_SET_FUNC_NAME, sizeof(ZEND_SET_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_COMPILE_ERROR, "The magic method __set() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __set() must have public visibility and can not be static"); } } else if ((name_len == sizeof(ZEND_UNSET_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_UNSET_FUNC_NAME, sizeof(ZEND_UNSET_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_COMPILE_ERROR, "The magic method __unset() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __unset() must have public visibility and can not be static"); } } else if ((name_len == sizeof(ZEND_ISSET_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_ISSET_FUNC_NAME, sizeof(ZEND_ISSET_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_COMPILE_ERROR, "The magic method __isset() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __isset() must have public visibility and can not be static"); } } else if ((name_len == sizeof(ZEND_TOSTRING_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_TOSTRING_FUNC_NAME, sizeof(ZEND_TOSTRING_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_COMPILE_ERROR, "The magic method __toString() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __toString() must have public visibility and can not be static"); } } } else { @@ -1266,37 +1266,37 @@ CG(active_class_entry)->clone = (zend_function *) CG(active_op_array); } else if ((name_len == sizeof(ZEND_CALL_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_COMPILE_ERROR, "The magic method __call() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __call() must have public visibility and can not be static"); } CG(active_class_entry)->__call = (zend_function *) CG(active_op_array); } else if ((name_len == sizeof(ZEND_CALLSTATIC_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_CALLSTATIC_FUNC_NAME, sizeof(ZEND_CALLSTATIC_FUNC_NAME)-1))) { if ((fn_flags & (ZEND_ACC_PPP_MASK ^ ZEND_ACC_PUBLIC)) || (fn_flags & ZEND_ACC_STATIC) == 0) { - zend_error(E_COMPILE_ERROR, "The magic method __callStatic() must have public visibility and be static"); + zend_error(E_WARNING, "The magic method __callStatic() must have public visibility and be static"); } CG(active_class_entry)->__callstatic = (zend_function *) CG(active_op_array); } else if ((name_len == sizeof(ZEND_GET_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_GET_FUNC_NAME, sizeof(ZEND_GET_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_COMPILE_ERROR, "The magic method __get() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __get() must have public visibility and can not be static"); } CG(active_class_entry)->__get = (zend_function *) CG(active_op_array); } else if ((name_len == sizeof(ZEND_SET_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_SET_FUNC_NAME, sizeof(ZEND_SET_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_COMPILE_ERROR, "The magic method __set() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __set() must have public visibility and can not be static"); } CG(active_class_entry)->__set = (zend_function *) CG(active_op_array); } else if ((name_len == sizeof(ZEND_UNSET_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_UNSET_FUNC_NAME, sizeof(ZEND_UNSET_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_COMPILE_ERROR, "The magic method __unset() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __unset() must have public visibility and can not be static"); } CG(active_class_entry)->__unset = (zend_function *) CG(active_op_array); } else if ((name_len == sizeof(ZEND_ISSET_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_ISSET_FUNC_NAME, sizeof(ZEND_ISSET_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_COMPILE_ERROR, "The magic method __isset() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __isset() must have public visibility and can not be static"); } CG(active_class_entry)->__isset = (zend_function *) CG(active_op_array); } else if ((name_len == sizeof(ZEND_TOSTRING_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_TOSTRING_FUNC_NAME, sizeof(ZEND_TOSTRING_FUNC_NAME)-1))) { if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) { - zend_error(E_COMPILE_ERROR, "The magic method __toString() must have public visibility and can not be static"); + zend_error(E_WARNING, "The magic method __toString() must have public visibility and can not be static"); } CG(active_class_entry)->__tostring = (zend_function *) CG(active_op_array); } else if (!(fn_flags & ZEND_ACC_STATIC)) { http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/magic_methods_002.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: ZendEngine2/tests/magic_methods_002.phpt diff -u ZendEngine2/tests/magic_methods_002.phpt:1.1.2.2 ZendEngine2/tests/magic_methods_002.phpt:1.1.2.3 --- ZendEngine2/tests/magic_methods_002.phpt:1.1.2.2 Tue Jun 3 14:07:15 2008 +++ ZendEngine2/tests/magic_methods_002.phpt Tue Jun 10 23:09:09 2008 @@ -11,4 +11,4 @@ ?> --EXPECTF-- -Fatal error: The magic method __unset() must have public visibility and can not be static in %s on line %d +Warning: The magic method __unset() must have public visibility and can not be static in %s on line %d http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/magic_methods_003.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: ZendEngine2/tests/magic_methods_003.phpt diff -u ZendEngine2/tests/magic_methods_003.phpt:1.1.2.2 ZendEngine2/tests/magic_methods_003.phpt:1.1.2.3 --- ZendEngine2/tests/magic_methods_003.phpt:1.1.2.2 Tue Jun 3 14:07:15 2008 +++ ZendEngine2/tests/magic_methods_003.phpt Tue Jun 10 23:09:09 2008 @@ -11,4 +11,4 @@ ?> --EXPECTF-- -Fatal error: The magic method __unset() must have public visibility and can not be static in %s on line %d +Warning: The magic method __unset() must have public visibility and can not be static in %s on line %d http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/magic_methods_004.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: ZendEngine2/tests/magic_methods_004.phpt diff -u ZendEngine2/tests/magic_methods_004.phpt:1.1.2.2 ZendEngine2/tests/magic_methods_004.phpt:1.1.2.3 --- ZendEngine2/tests/magic_methods_004.phpt:1.1.2.2 Tue Jun 3 14:07:15 2008 +++ ZendEngine2/tests/magic_methods_004.phpt Tue Jun 10 23:09:09 2008 @@ -11,4 +11,4 @@ ?> --EXPECTF-- -Fatal error: The magic method __unset() must have public visibility and can not be static in %s on line %d +Warning: The magic method __unset() must have public visibility and can not be static in %s on line %d http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/magic_methods_005.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: ZendEngine2/tests/magic_methods_005.phpt diff -u ZendEngine2/tests/magic_methods_005.phpt:1.1.2.2 ZendEngine2/tests/magic_methods_005.phpt:1.1.2.3 --- ZendEngine2/tests/magic_methods_005.phpt:1.1.2.2 Tue Jun 3 14:07:15 2008 +++ ZendEngine2/tests/magic_methods_005.phpt Tue Jun 10 23:09:09 2008 @@ -9,4 +9,4 @@ ?> --EXPECTF-- -Fatal error: The magic method __call() must have public visibility and can not be static in %s on line %d +Warning: The magic method __call() must have public visibility and can not be static in %s on line %d http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/magic_methods_006.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: ZendEngine2/tests/magic_methods_006.phpt diff -u ZendEngine2/tests/magic_methods_006.phpt:1.1.2.2 ZendEngine2/tests/magic_methods_006.phpt:1.1.2.3 --- ZendEngine2/tests/magic_methods_006.phpt:1.1.2.2 Tue Jun 3 14:07:15 2008 +++ ZendEngine2/tests/magic_methods_006.phpt Tue Jun 10 23:09:09 2008 @@ -9,4 +9,4 @@ ?> --EXPECTF-- -Fatal error: The magic method __callStatic() must have public visibility and be static in %s on line %d +Warning: The magic method __callStatic() must have public visibility and be static in %s on line %d http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/magic_methods_007.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: ZendEngine2/tests/magic_methods_007.phpt diff -u ZendEngine2/tests/magic_methods_007.phpt:1.1.2.2 ZendEngine2/tests/magic_methods_007.phpt:1.1.2.3 --- ZendEngine2/tests/magic_methods_007.phpt:1.1.2.2 Tue Jun 3 14:07:15 2008 +++ ZendEngine2/tests/magic_methods_007.phpt Tue Jun 10 23:09:09 2008 @@ -9,4 +9,6 @@ ?> --EXPECTF-- -Fatal error: The magic method __set() must have public visibility and can not be static in %s on line %d +Warning: The magic method __set() must have public visibility and can not be static in %s on line %d + +Fatal error: Method b::__set() must take exactly 2 arguments in %s on line %d http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/magic_methods_008.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: ZendEngine2/tests/magic_methods_008.phpt diff -u ZendEngine2/tests/magic_methods_008.phpt:1.1.2.2 ZendEngine2/tests/magic_methods_008.phpt:1.1.2.3 --- ZendEngine2/tests/magic_methods_008.phpt:1.1.2.2 Tue Jun 3 14:07:15 2008 +++ ZendEngine2/tests/magic_methods_008.phpt Tue Jun 10 23:09:09 2008 @@ -14,4 +14,6 @@ ?> --EXPECTF-- -Fatal error: The magic method __set() must have public visibility and can not be static in %s on line %d +Warning: The magic method __set() must have public visibility and can not be static in %s on line %d + +Fatal error: Access level to a::__set() must be public (as in class b) in %s on line %d http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/magic_methods_009.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: ZendEngine2/tests/magic_methods_009.phpt diff -u ZendEngine2/tests/magic_methods_009.phpt:1.1.2.2 ZendEngine2/tests/magic_methods_009.phpt:1.1.2.3 --- ZendEngine2/tests/magic_methods_009.phpt:1.1.2.2 Tue Jun 3 14:07:15 2008 +++ ZendEngine2/tests/magic_methods_009.phpt Tue Jun 10 23:09:09 2008 @@ -10,4 +10,4 @@ ?> --EXPECTF-- -Fatal error: The magic method __callStatic() must have public visibility and be static in %s on line %d +Warning: The magic method __callStatic() must have public visibility and be static in %s on line %d http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/magic_methods_010.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: ZendEngine2/tests/magic_methods_010.phpt diff -u ZendEngine2/tests/magic_methods_010.phpt:1.1.2.2 ZendEngine2/tests/magic_methods_010.phpt:1.1.2.3 --- ZendEngine2/tests/magic_methods_010.phpt:1.1.2.2 Tue Jun 3 14:07:15 2008 +++ ZendEngine2/tests/magic_methods_010.phpt Tue Jun 10 23:09:09 2008 @@ -10,4 +10,6 @@ ?> --EXPECTF-- -Fatal error: The magic method __toString() must have public visibility and can not be static in %s on line %d +Warning: The magic method __toString() must have public visibility and can not be static in %s on line %d + +Fatal error: Method a::__tostring() cannot take arguments in %s on line %d
« previous php.zend-engine.cvs (#6797) next »