From 899317b650b59582ceff7f647f1644acc291e98e Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Thu, 2 Feb 2023 16:47:53 -0500 Subject: [PATCH] fix: Check if args is an valid index before counting --- src/MyFuses/Exceptions/MyFusesException.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MyFuses/Exceptions/MyFusesException.php b/src/MyFuses/Exceptions/MyFusesException.php index 30de15b..3ea2ad6 100755 --- a/src/MyFuses/Exceptions/MyFusesException.php +++ b/src/MyFuses/Exceptions/MyFusesException.php @@ -157,12 +157,12 @@ static function getTraceFunctionString($trace) $out .= $trace['function'] . "(" ; - if (count($trace['args'])) { + if (isset($trace['args']) && count($trace['args'])) { $out .= " "; } $traceX = array(); - if (count($trace['args'])) { + if (isset($trace['args']) && count($trace['args'])) { foreach ($trace['args'] as $key => $value) { if (is_object($value)) { @$traceX[$key] = "" . get_class($value) . @@ -179,7 +179,7 @@ static function getTraceFunctionString($trace) } $out .= implode(", ", $traceX); - if (count($trace['args'])) { + if (isset($trace['args']) && count($trace['args'])) { $out .= " "; }