From bcdfe14e02f1dc54dd71b56e14fa58bcdd229a0b Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 5 Feb 2003 10:52:55 +0000 Subject: [PATCH] Whoops, fixed some obvious bugs when getting slash arguments --- lib/weblib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index 066856ae93..536d1673f1 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -147,6 +147,7 @@ function me() { } else { notify("Warning: Could not find any of these web server variables: \$REQUEST_URI, \$PHP_SELF or \$SCRIPT_NAME"); + return false; } } @@ -162,6 +163,7 @@ function qualified_me() { $hostname = $_ENV["SERVER_NAME"]; } else { notify("Warning: could not find the name of this server!"); + return false; } $protocol = (isset($_SERVER["HTTPS"]) and $_SERVER["HTTPS"] == "on") ? "https://" : "http://"; @@ -425,8 +427,8 @@ function get_slash_arguments($file="file.php") { $pathinfo = explode($file, $string); - if (!empty($path_info[1])) { - return $path_info[1]; + if (!empty($pathinfo[1])) { + return $pathinfo[1]; } else { return false; } -- 2.39.5