diff --git a/src/Statement.php b/src/Statement.php index 9701d51..4253db4 100644 --- a/src/Statement.php +++ b/src/Statement.php @@ -152,8 +152,8 @@ private function parseErrorClickHouse(string $body) return false; } - private function hasErrorClickhouse(string $body, string $contentType): bool { - if (false === stripos($contentType, 'application/json')) { + private function hasErrorClickhouse(string $body, ?string $contentType): bool { + if ($contentType === null || false === stripos($contentType, 'application/json')) { return preg_match(self::CLICKHOUSE_ERROR_REGEX, $body) === 1; }