diff --git a/src/Snowplow/RefererParser/Parser.php b/src/Snowplow/RefererParser/Parser.php index 0c8931d..4fc4e33 100644 --- a/src/Snowplow/RefererParser/Parser.php +++ b/src/Snowplow/RefererParser/Parser.php @@ -50,7 +50,10 @@ public function parse($refererUrl, $pageUrl = null) $searchTerm = null; if ($referer['parameters']) { - parse_str($refererParts['query'], $queryParts); + $queryParts = []; + if (null !== $refererParts['query']) { + parse_str($refererParts['query'], $queryParts); + } foreach ($referer['parameters'] as $parameter) { $searchTerm = isset($queryParts[$parameter]) ? $queryParts[$parameter] : $searchTerm; }