X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=http.php;h=6c8f916412ef4127777fc836c1eb369b54ed5312;hb=414082e3e11cee010f869633733eccb4f2161153;hp=1abd50bc1757abe53f46ef77f95ba4734aa6770a;hpb=88edfcf26c7b4cdbd083dede0834de5cf6f16999;p=wfpl.git 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(); }