|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-03-30 14:50 UTC] phresno at concept-factory dot com
After trying to use set_error_handler() with my own handler, I now recieve no error reporting on any script, regardless of using set_error_handler() or not.
Example:
<?php
error_reporting(E_ALL);
define("STUFF", 1);
if (true)
{
define("STUFF", 2);
?>
Would normally generate messages about trying to redefine STUFF, and not closing the IF statement; however, I now recieve no error/warnring/notice messages at all from PHP.
This happened after trying to use set_erro_handler() in a a different script example:
<?php
function my_handler($_errno, $_errstr, $_errfile, $_errline)
{
printf("%i - %s in %s on line %i",
$_errno,
$_errstr,
$_errfile,
$_errline);
return true;
}
set_error_handler("my_handler");
trigger_error("Just something in general", E_USER_ERROR);
?>
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 05:00:01 2025 UTC |
I also tested this with PHP 4.2.3 on a NetBSD system. I've gotten the same resultes, even when using ini_set("display_errors", "1"); and ini_set("html_errors", "1"); along with error_reporting(E_ALL);Seems to have been my mistake in what I was expecting PHP to report. I still get scripts that die without reporting errors at all such as with leaving off a ;, or not closing a { with }, however, I recieve warnings for incorrect argument counts to functions.