I have a PHP custom error handler that does everything it's supposed to besides run a DB query. The code is below
public function fatalErrHandlr(){
$errstrArr = error_get_last();
$errno = $errstrArr['type'];
$errstr = $errstrArr['message'];
$errfile = $errstrArr['file'];
$errline = $errstrArr['line'];
$query = "INSERT INTO `err` (`errno`, `errstr`, `errfile`, `errline`) VALUES ('$errno', '$errstr', '$errfile', '$errline')";
mysqli_query($this->dbc, $query);
echo("<b>There was an error. Check the database.</b>");
return true;
}
When I run this, it should put the error in the database, but nothing is added to the table. I did run the query in phpMyAdmin, and there are no errors there.