diff --git a/src/PSR7/Validators/SerializedParameter.php b/src/PSR7/Validators/SerializedParameter.php index 959d7fbe..0f3e3637 100644 --- a/src/PSR7/Validators/SerializedParameter.php +++ b/src/PSR7/Validators/SerializedParameter.php @@ -267,6 +267,10 @@ protected function convertToSerializationStyleForQuery($value, ?CebeSchema $sche { if (in_array($this->style, [self::STYLE_FORM, self::STYLE_SPACE_DELIMITED, self::STYLE_PIPE_DELIMITED], true)) { if ($this->explode === false) { + if (! is_string($value)) { + throw TypeMismatch::becauseTypeDoesNotMatch(['string'], $value); + } + $value = explode(self::STYLE_DELIMITER_MAP[$this->style], $value); }