cvs: ZendEngine2(PHP_5_3) / zend_compile.c /tests bug47981.phpt
[email protected] ("Hannes Magnusson") Thu, 16 Apr 2009 13:48:01 -0000
| Newsgroups | php.zend-engine.cvs |
|---|---|
| Message-ID | <cvsbjori1239889681@cvsserver> |
bjori Thu Apr 16 13:48:01 2009 UTC
Added files: (Branch: PHP_5_3)
/ZendEngine2/tests bug47981.phpt
Modified files:
/ZendEngine2 zend_compile.c
Log:
MFH: Fixed bug#47981 (error handler not called regardless)
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.41.2.105&r2=1.647.2.27.2.41.2.106&diff_format=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.105 ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.106
--- ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.105 Wed Apr 8 13:17:09 2009
+++ ZendEngine2/zend_compile.c Thu Apr 16 13:48:01 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.105 2009/04/08 13:17:09 dmitry Exp $ */
+/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.106 2009/04/16 13:48:01 bjori Exp $ */
#include <zend_language_parser.h>
#include "zend.h"
@@ -2631,7 +2631,7 @@
if (!zend_do_perform_implementation_check(child, child->common.prototype)) {
zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(child->common.prototype), child->common.prototype->common.function_name);
}
- } else if (EG(error_reporting) & E_STRICT) { /* Check E_STRICT before the check so that we save some time */
+ } else if (EG(error_reporting) & E_STRICT || EG(user_error_handler)) { /* Check E_STRICT (or custom error handler) before the check so that we save some time */
if (!zend_do_perform_implementation_check(child, parent)) {
zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(parent), parent->common.function_name);
}
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug47981.phpt?view=markup&rev=1.1
Index: ZendEngine2/tests/bug47981.phpt
+++ ZendEngine2/tests/bug47981.phpt
--TEST--
Bug #47981 (error handler not called regardless)
--INI--
error_reporting=0
--FILE--
<?php
function errh($errno, $errstr) {
var_dump($errstr);
}
set_error_handler("errh");
interface a{}
class b implements a { function f($a=1) {}}
class c extends b {function f() {}}
?>
--EXPECTF--
unicode(62) "Declaration of c::f() should be compatible with that of b::f()"