[BUGFIX] Invalid constant in the domain redirect function 66/27066/3
authorTim Lochmueller <tim@fruit-lab.de>
Mon, 27 Jan 2014 08:44:14 +0000 (09:44 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 28 Jan 2014 18:28:28 +0000 (19:28 +0100)
There is a "copy-and-paste" mistake in the domain redirect mechanism.
The function HttpUtility::redirect should call with a valid HTTP
status code (the const value) and not with the name of the constant.

Resolves: #55350
Releases: 6.2, 6.1, 6.0, 4.5
Change-Id: I97f55ac8df1688011198666da1fd322a5c3bd323
Reviewed-on: https://review.typo3.org/27066
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/frontend/Classes/Page/PageRepository.php

index bb691cc..d10ad78 100644 (file)
@@ -539,7 +539,7 @@ class PageRepository {
                                if ($statusCode && defined('TYPO3\\CMS\\Core\\Utility\\HttpUtility::HTTP_STATUS_' . $statusCode)) {
                                        \TYPO3\CMS\Core\Utility\HttpUtility::redirect($redirectUrl, constant('TYPO3\\CMS\\Core\\Utility\\HttpUtility::HTTP_STATUS_' . $statusCode));
                                } else {
-                                       \TYPO3\CMS\Core\Utility\HttpUtility::redirect($redirectUrl, 'TYPO3\\CMS\\Core\\Utility\\HttpUtility::HTTP_STATUS_301');
+                                       \TYPO3\CMS\Core\Utility\HttpUtility::redirect($redirectUrl, \TYPO3\CMS\Core\Utility\HttpUtility::HTTP_STATUS_301);
                                }
                                die;
                        } else {