diff --git a/lib/Assert/Assertion.php b/lib/Assert/Assertion.php index 243e64d..c3dcc2c 100644 --- a/lib/Assert/Assertion.php +++ b/lib/Assert/Assertion.php @@ -1857,7 +1857,7 @@ public static function false($value, $message = null, string $propertyPath = nul */ public static function classExists($value, $message = null, string $propertyPath = null): bool { - if (!\class_exists($value)) { + if (!\is_string($value) || !\class_exists($value)) { $message = \sprintf( static::generateMessage($message ?: 'Class "%s" does not exist.'), static::stringify($value)