X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl.git;a=blobdiff_plain;f=http.php;h=6c8f916412ef4127777fc836c1eb369b54ed5312;hp=1abd50bc1757abe53f46ef77f95ba4734aa6770a;hb=062d46e16429f2e55573567518cb01c83b319ac4;hpb=88edfcf26c7b4cdbd083dede0834de5cf6f16999 diff --git a/http.php b/http.php index 1abd50b..6c8f916 100644 --- a/http.php +++ b/http.php @@ -78,11 +78,14 @@ function redirect($url, $status = '302 Moved Temporarily', $message = '') { if(substr($url, 0, 1) == '/') { $url = this_url_sans_path() . $url; } else { - $url = ereg_replace('/[^/]*$', "/$url", this_url()); + $url = preg_replace('|/[^/]*$|', "/$url", this_url()); } } if(function_exists('session_save_messages')) { + if(function_exists('atexit_now')) { + atexit_now(); + } session_save_messages(); }