diff --git a/e107_handlers/redirection_class.php b/e107_handlers/redirection_class.php index 7aa32575a..d9611eca8 100644 --- a/e107_handlers/redirection_class.php +++ b/e107_handlers/redirection_class.php @@ -325,14 +325,15 @@ class redirection public function redirect($url, $replace = TRUE, $http_response_code = NULL, $preventCache = true) { - return $this->go($url, $replace, $http_response_code, $preventCache); + $this->go($url, $replace, $http_response_code, $preventCache); + exit; } /** * Redirect to the given URI * - * @param string $url + * @param string $url or error code number. eg. 404 = Not Found. * @param boolean $replace - default TRUE * @param integer|null $http_response_code - default NULL * @param boolean $preventCache @@ -341,13 +342,15 @@ class redirection public function go($url, $replace = TRUE, $http_response_code = NULL, $preventCache = true) { $url = str_replace("&", "&", $url); // cleanup when using e_QUERY in $url; - - if(defset('e_DEBUG') == 'redirect') + + if(defset('e_DEBUG') === 'redirect') { $error = debug_backtrace(); e107::getLog()->addDebug("URL: ".$url."\nFile: ".$error[1]['file']."\nLine: ".$error[1]['line']."\nClass: ".$error[1]['class']."\nFunction: ".$error[1]['function']."\n\n"); e107::getLog()->toFile('redirect.log',true); + echo "debug active"; + return; } if(session_id()) diff --git a/page.php b/page.php index 2b10e6468..ef19fcd8b 100644 --- a/page.php +++ b/page.php @@ -539,7 +539,8 @@ class pageClass if(!$sql->gen($query)) { - + header("HTTP/1.0 404 Not Found"); + // exit; /* $ret['title'] = LAN_PAGE_12; // ***** CHANGED