diff --git a/src/Extensions/SearchDocumentGenerator.php b/src/Extensions/SearchDocumentGenerator.php index b652aec..dd79b87 100644 --- a/src/Extensions/SearchDocumentGenerator.php +++ b/src/Extensions/SearchDocumentGenerator.php @@ -23,7 +23,11 @@ public function getGenerateSearchLink() { $owner = $this->owner; if(method_exists($owner, 'Link')) { - return $owner->Link() . '&SearchGen=1'; + $link = $owner->Link(); + if(strpos($link, '?') !== false) { + return $link . '&SearchGen=1'; + } + return $link . '?SearchGen=1'; } $class = get_class($owner); throw new Exception(