Skip to content

Instantly share code, notes, and snippets.

@robert-wallis
Created September 17, 2011 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robert-wallis/1223676 to your computer and use it in GitHub Desktop.
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
<?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