Skip to content

Commit

Permalink
fix: Check if args is an valid index before counting
Browse files Browse the repository at this point in the history
  • Loading branch information
piraz committed Feb 2, 2023
1 parent bb168a6 commit 899317b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/MyFuses/Exceptions/MyFusesException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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] = "<b>" . get_class($value) .
Expand All @@ -179,7 +179,7 @@ static function getTraceFunctionString($trace)
}
$out .= implode(", ", $traceX);

if (count($trace['args'])) {
if (isset($trace['args']) && count($trace['args'])) {
$out .= " ";
}

Expand Down

0 comments on commit 899317b

Please sign in to comment.