[BUGFIX] Fix regression in prefixLocalAchors feature
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / Controller / TypoScriptFrontendController.php
index 73ff42a..5fa9fd9 100644 (file)
@@ -4361,6 +4361,9 @@ if (version == "n3") {
         */
        public function prefixLocalAnchorsWithScript() {
                if (!$this->beUserLogin) {
+                       if (!is_object($this->cObj)) {
+                               $this->newCObj();
+                       }
                        $scriptPath = $this->cObj->getUrlToCurrentLocation();
                } else {
                        // To break less existing sites, we allow the REQUEST_URI to be used for the prefix