[BUGFIX] Fix regression in prefixLocalAchors feature
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / Controller / TypoScriptFrontendController.php
index f100272..3b3b543 100644 (file)
@@ -4103,6 +4103,9 @@ class TypoScriptFrontendController {
         */
        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