Use `getActiveRequest()` method in favor of directly accessing the class property
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 6 Jul 2021 09:21:54 +0000 (11:21 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 6 Jul 2021 09:21:54 +0000 (11:21 +0200)
wcfsetup/install/files/lib/system/request/RequestHandler.class.php

index 53c46655be6089ca9060bff5baaafe3a9bf43769..5f3308fb9953cfd0f08e78ad7294c5120fb69df7 100644 (file)
@@ -79,8 +79,8 @@ class RequestHandler extends SingletonFactory
             if (
                 $this->isACPRequest()
                 && ENABLE_ENTERPRISE_MODE
-                && \defined($this->activeRequest->getClassName() . '::BLACKLISTED_IN_ENTERPRISE_MODE')
-                && \constant($this->activeRequest->getClassName() . '::BLACKLISTED_IN_ENTERPRISE_MODE')
+                && \defined($this->getActiveRequest()->getClassName() . '::BLACKLISTED_IN_ENTERPRISE_MODE')
+                && \constant($this->getActiveRequest()->getClassName() . '::BLACKLISTED_IN_ENTERPRISE_MODE')
                 && !WCF::getUser()->hasOwnerAccess()
             ) {
                 throw new IllegalLinkException();
@@ -90,7 +90,7 @@ class RequestHandler extends SingletonFactory
             if (!$this->isACPRequest() && \defined('OFFLINE') && OFFLINE) {
                 if (
                     !WCF::getSession()->getPermission('admin.general.canViewPageDuringOfflineMode')
-                    && !$this->activeRequest->isAvailableDuringOfflineMode()
+                    && !$this->getActiveRequest()->isAvailableDuringOfflineMode()
                 ) {
                     if (
                         isset($_SERVER['HTTP_X_REQUESTED_WITH'])
@@ -116,7 +116,7 @@ class RequestHandler extends SingletonFactory
             }
 
             // start request
-            $this->activeRequest->execute();
+            $this->getActiveRequest()->execute();
         } catch (NamedUserException $e) {
             $e->show();