From 1c6aa1b401aab39ee1071aab76983c6ede6d1efe Mon Sep 17 00:00:00 2001 From: ADmad Date: Fri, 15 Sep 2023 16:43:06 +0530 Subject: [PATCH] Fix "undefined array key" error. Fixes #414. --- src/Traits/FrozenTimeTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Traits/FrozenTimeTrait.php b/src/Traits/FrozenTimeTrait.php index 198ab7b0..c8ff5f60 100644 --- a/src/Traits/FrozenTimeTrait.php +++ b/src/Traits/FrozenTimeTrait.php @@ -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