Created
September 17, 2011 06:04
-
-
Save robert-wallis/1223676 to your computer and use it in GitHub Desktop.
turn on error reporting, because it's often off for security / bad programming reasons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
function error_handler($number, $string, $file, $line) | |
{ | |
if (intval(E_WARNING) != intval($number)) | |
{ | |
print("PHP Error: ".$number." ".$file."(".$line.")"."<br />".$string."<br />"); | |
} | |
} | |
set_error_handler("error_handler"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment