cvs: ZendEngine2(PHP_5_2) / zend_compile.c /tests bug47981.phpt
[email protected] ("Hannes Magnusson") Thu, 16 Apr 2009 13:52:24 -0000
| Newsgroups | php.zend-engine.cvs |
|---|---|
| Message-ID | <cvsbjori1239889944@cvsserver> |
bjori Thu Apr 16 13:52:24 2009 UTC
Added files: (Branch: PHP_5_2)
/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.55&r2=1.647.2.27.2.56&diff_format=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.55 ZendEngine2/zend_compile.c:1.647.2.27.2.56
--- ZendEngine2/zend_compile.c:1.647.2.27.2.55 Wed Apr 8 00:28:04 2009
+++ ZendEngine2/zend_compile.c Thu Apr 16 13:52:23 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.647.2.27.2.55 2009/04/08 00:28:04 felipe Exp $ */
+/* $Id: zend_compile.c,v 1.647.2.27.2.56 2009/04/16 13:52:23 bjori Exp $ */
#include <zend_language_parser.h>
#include "zend.h"
@@ -2135,7 +2135,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()"