cvs: ZendEngine2 / zend_compile.c /tests bug47981.phpt
"Hannes Magnusson" <[email protected]> Thu, 16 Apr 2009 13:47:25 -0000
| Newsgroups | gmane.comp.php.cvs.zend |
|---|---|
| Message-ID | <cvsbjori1239889645@cvsserver> |
bjori Thu Apr 16 13:47:25 2009 UTC
Added files:
/ZendEngine2/tests bug47981.phpt
Modified files:
/ZendEngine2 zend_compile.c
Log:
Fixed bug#47981 (error handler not called regardless)
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.854&r2=1.855&diff_format=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.854 ZendEngine2/zend_compile.c:1.855
--- ZendEngine2/zend_compile.c:1.854 Wed Apr 8 13:17:27 2009
+++ ZendEngine2/zend_compile.c Thu Apr 16 13:47:24 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.854 2009/04/08 13:17:27 dmitry Exp $ */
+/* $Id: zend_compile.c,v 1.855 2009/04/16 13:47:24 bjori Exp $ */
#include <zend_language_parser.h>
#include "zend.h"
@@ -2722,7 +2722,7 @@
if (!zend_do_perform_implementation_check(child, child->common.prototype TSRMLS_CC)) {
zend_error(E_COMPILE_ERROR, "Declaration of %v::%v() must be compatible with that of %v::%v()", 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 TSRMLS_CC)) {
zend_error(E_STRICT, "Declaration of %v::%v() should be compatible with that of %v::%v()", 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()"
--
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php