diff --git a/EventListener/TargetWebspaceListener.php b/EventListener/TargetWebspaceListener.php
index <HASH>..<HASH> 100644
--- a/EventListener/TargetWebspaceListener.php
+++ b/EventListener/TargetWebspaceListener.php
@@ -59,7 +59,7 @@ class TargetWebspaceListener
         $webspaceKey = $this->requestAnalyzer->getWebspace()->getKey();
 
         if ($document->getMainWebspace() === $webspaceKey
-            || in_array($webspaceKey, $document->getAdditionalWebspaces())
+            || ($document->getAdditionalWebspaces() && in_array($webspaceKey, $document->getAdditionalWebspaces()))
         ) {
             return $webspaceKey;
         }
Fixed PHP warning in TargetWebspaceListene (#<I>)