From 15e963a235878ac60b906ea7f25aebf3a18f6af1 Mon Sep 17 00:00:00 2001 From: sasezaki Date: Thu, 30 Oct 2025 01:25:24 +0900 Subject: [PATCH] assert context offset exception is Throwable --- src/Test/TestLogger.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Test/TestLogger.php b/src/Test/TestLogger.php index d96af29..067a1c6 100644 --- a/src/Test/TestLogger.php +++ b/src/Test/TestLogger.php @@ -33,6 +33,8 @@ public function __construct(bool $placeholderInterpolation = false) */ public function log($level, string|\Stringable $message, array $context = []): void { + assert(isset($context['exception']) ? $context['exception'] instanceof \Throwable : true); + if ($this->placeholderInterpolation === true) { $message = $this->interpolate($message, $context); }