Honor the PHP error reporting settings and the @ suppression operator.

git-svn-id: http://yate.null.ro/svn/yate/trunk@6424 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2020-09-01 10:58:05 +00:00
parent 8941a23e94
commit 7f58764ca4
1 changed files with 3 additions and 1 deletions

View File

@ -532,7 +532,9 @@ class Yate
/* Internal error handler callback - output plain text to stderr */
function _yate_error_handler($errno, $errstr, $errfile, $errline)
{
$str = " [$errno] $errstr in $errfile line $errline\n";
if (0 === error_reporting())
return;
$str = "[$errno] $errstr in $errfile line $errline\n";
switch ($errno) {
case E_USER_ERROR:
Yate::Output("PHP fatal: $str");