X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Futil.php;h=64af25f059f7ffdd9806305c57aa2238727a3b1d;hb=893d11730908a7b59b6f28b743ff8391b578a8b9;hp=e07b17ced521784e7c007d51c12cf4badab7aea5;hpb=0c17c322676d98d3a8bb6698818e0eefa556b917;p=quix0rs-gnu-social.git diff --git a/lib/util.php b/lib/util.php index e07b17ced5..64af25f059 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1391,6 +1391,7 @@ function common_path($relative, $ssl=false, $addSession=true) return $proto.'://'.$serverpart.'/'.$pathpart.$relative; } +// FIXME: Maybe this should also be able to handle non-fancy URLs with index.php?p=... function common_fake_local_fancy_url($url) { /** @@ -1416,7 +1417,7 @@ function common_fake_local_fancy_url($url) // [4] + [5] extract index.php (+ possible leading double /) and the rest of the URL separately. '(\/?index\.php\/)(.*)$/', $url, $matches)) { // if preg_match failed to match - throw Exception('No known change could be made to the URL.'); + throw new Exception('No known change could be made to the URL.'); } // now reconstruct the URL with everything except the "index.php/" part