From 7f58764ca46088cef311901dce2657d8fd990f98 Mon Sep 17 00:00:00 2001 From: paulc Date: Tue, 1 Sep 2020 10:58:05 +0000 Subject: [PATCH] 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 --- share/scripts/libyate.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/scripts/libyate.php b/share/scripts/libyate.php index 87e0ffe2..7b18a7c6 100644 --- a/share/scripts/libyate.php +++ b/share/scripts/libyate.php @@ -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");