[BUGFIX] Add missing parameter in "Page not found" handling
authorSteffen Gebert <steffen.gebert@typo3.org>
Sun, 3 Apr 2011 18:42:13 +0000 (20:42 +0200)
committerXavier Perseguers <typo3@perseguers.ch>
Thu, 7 Apr 2011 09:58:23 +0000 (11:58 +0200)
t3lib_message_ErrorpageMessage::__construct() requires two parameters,
however only one is given after change #24945, which modified the
handling of 404 errors.

This patch adds the second one.

Change-Id: I7c82c11e4d90c1127076370e72fa99cd2ccda03b
Resolves: #25727
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/1451
Reviewed-by: Steffen Kamper
Tested-by: Steffen Kamper
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
typo3/sysext/cms/tslib/class.tslib_fe.php

index 1c60c5a..06cce65 100644 (file)
 
                        // Create response:
                if (gettype($code)=='boolean' || !strcmp($code,1))      {       // Simply boolean; Just shows TYPO3 error page with reason:
+                       $title = 'Page Not Found';
                        $message = 'The page did not exist or was inaccessible.' . ($reason ? ' Reason: ' . htmlspecialchars($reason) : '');
-                       $messagePage = t3lib_div::makeInstance('t3lib_message_ErrorpageMessage', $message);
+                       $messagePage = t3lib_div::makeInstance('t3lib_message_ErrorpageMessage', $message, $title);
                        $messagePage->output();
                        exit;
                } elseif (t3lib_div::isFirstPartOfStr($code,'USER_FUNCTION:')) {
                                echo $content;  // Output the content
                        }
                } else {
+                       $title = 'Page Not Found';
                        $message = ($reason ? 'Reason: ' . htmlspecialchars($reason) : 'Page cannot be found.');
-                       $messagePage = t3lib_div::makeInstance('t3lib_message_ErrorpageMessage', $message);
+                       $messagePage = t3lib_div::makeInstance('t3lib_message_ErrorpageMessage', $message, $title);
                        $messagePage->output();
                }
                exit();