From 0a5408c8219f80a0125a9c2c47d84392bb8520af Mon Sep 17 00:00:00 2001 From: jrfnl Date: Fri, 25 Aug 2023 03:03:57 +0200 Subject: [PATCH] Exceptions/TestTargetNotFound: improve defensive coding --- PHPCSUtils/Exceptions/TestTargetNotFound.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PHPCSUtils/Exceptions/TestTargetNotFound.php b/PHPCSUtils/Exceptions/TestTargetNotFound.php index 0e9eed68..d9838080 100644 --- a/PHPCSUtils/Exceptions/TestTargetNotFound.php +++ b/PHPCSUtils/Exceptions/TestTargetNotFound.php @@ -34,7 +34,7 @@ final class TestTargetNotFound extends OutOfBoundsException public static function create($marker, $content, $file) { $contentPhrase = ''; - if ($content !== null) { + if (\is_string($content)) { $contentPhrase = ' with token content: ' . $content; }