From d5fcc1e190e104de9470f70d8476c466daa3a756 Mon Sep 17 00:00:00 2001 From: David Flatz Date: Tue, 7 Oct 2014 16:23:24 +0200 Subject: instantiate it_html noredir debug parameter is set and it wasn't initialized before, this happens when we redirect in auto_prepend --- it_url.class | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'it_url.class') diff --git a/it_url.class b/it_url.class index 5ed6294..7ed0bce 100644 --- a/it_url.class +++ b/it_url.class @@ -774,8 +774,11 @@ function redirect($url = null, $type = "temporary") it::fatal("Invalid redirect type '$type', must be 'permanent' or 'temporary'"); $url = preg_replace("/[\r\n].*/", '', it_url::absolute($url)); # Security: cut after CR/LF - if (EDC('noredir')) + if (EDC('noredir')) { + if (!function_exists('a')) + new it_html(); echo a(array('href' => $url), Q($url)) . Q(" (HTTP/1.1 $code, $type redirect)") . br() . Q("Trace: " . it_debug::backtrace()); + } else header('Location: ' . it_untaint($url, TC_SELF), true, $code); exit; -- cgit v1.2.3