diff options
author | David Flatz | 2014-10-07 16:23:24 +0200 |
---|---|---|
committer | David Flatz | 2014-10-07 16:26:48 +0200 |
commit | d5fcc1e190e104de9470f70d8476c466daa3a756 (patch) | |
tree | fdfa32f4e34649217c80c3d4d862aeaa89ec394b /it_url.class | |
parent | aa4b89767df4a0753f1a3b62e04a4817bb199fef (diff) | |
download | itools-d5fcc1e190e104de9470f70d8476c466daa3a756.tar.gz itools-d5fcc1e190e104de9470f70d8476c466daa3a756.tar.bz2 itools-d5fcc1e190e104de9470f70d8476c466daa3a756.zip |
instantiate it_html noredir debug parameter is set and it wasn't initialized before, this happens when we redirect in auto_prepend
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 5 |
1 files changed, 4 insertions, 1 deletions
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; |