Skip to content

Commit

Permalink
Merge pull request #415 from cakephp/issue-414
Browse files Browse the repository at this point in the history
Fix "undefined array key" error.
  • Loading branch information
dereuromark authored Sep 15, 2023
2 parents dd58390 + 1c6aa1b commit 1b563f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/FrozenTimeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function setTimezone($value)
$trace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 5);
$found = false;
foreach ($trace as $frame) {
$found = in_array(
$found = isset($frame['class']) && in_array(
$frame['class'],
['PHPUnit\Framework\Assert', 'PHPUnit\Framework\Constraint\IsEqual'],
true
Expand Down

0 comments on commit 1b563f0

Please sign in to comment.