From: Vincent Vanwaelscappel Date: Wed, 19 Jan 2022 12:29:06 +0000 (+0100) Subject: wip #4804 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ca0490a2d598db3d814ab27fd36b26ff29af99d5;p=cubist_minisearch.git wip #4804 --- diff --git a/src/Document.php b/src/Document.php index c539ec8..6363084 100644 --- a/src/Document.php +++ b/src/Document.php @@ -145,11 +145,13 @@ class Document } /** - * @param string|array $keywords + * @param string|array|null $keywords */ - public function setKeywords(string|array $keywords): void + public function setKeywords(string|array|null $keywords): void { - if (is_array($keywords)) { + if(null===$keywords){ + $keywords=''; + }else if (is_array($keywords)) { $keywords = implode(' ', $keywords); } $this->keywords = $keywords;