Return updated data in RoutingCacheBuilder::handleLandingPageWithOverriddenApplication()
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 27 May 2022 12:03:22 +0000 (14:03 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 27 May 2022 12:03:22 +0000 (14:03 +0200)
see 662b3c73f9cffedca8c9c88397313f4aec243a77

wcfsetup/install/files/lib/system/cache/builder/RoutingCacheBuilder.class.php

index 33dbcfc34bf81ed750234d5bf10735ca168abf30..30da257966e1e2a62c5a375a133556145736f9f4 100644 (file)
@@ -46,7 +46,7 @@ class RoutingCacheBuilder extends AbstractCacheBuilder
         $data['customUrls'] = $this->getCustomUrls($data['landingPages']);
         $data['applicationOverrides'] = $this->getApplicationOverrides($data['customUrls']);
 
-        $this->handleLandingPageWithOverriddenApplication($data);
+        $data = $this->handleLandingPageWithOverriddenApplication($data);
 
         return $data;
     }
@@ -400,10 +400,10 @@ class RoutingCacheBuilder extends AbstractCacheBuilder
         return $data;
     }
 
-    protected function handleLandingPageWithOverriddenApplication(array &$data)
+    protected function handleLandingPageWithOverriddenApplication(array $data): array
     {
         if (!PACKAGE_ID) {
-            return;
+            return $data;
         }
 
         $landingPageController = $data['landingPages']['wcf'][0];
@@ -430,5 +430,7 @@ class RoutingCacheBuilder extends AbstractCacheBuilder
                 $data['landingPages'][$overriddenApplication] = \array_slice($data['landingPages']['wcf'], 0);
             }
         }
+
+        return $data;
     }
 }