From: martin Date: Thu, 5 Sep 2002 11:56:20 +0000 (+0000) Subject: Better error message when invalid arguments are supplied. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=55b8ac31072988b60472421d2d6fd93567c07cc0;p=moodle.git Better error message when invalid arguments are supplied. --- diff --git a/file.php b/file.php index 95e6e8fc6f..78c3ecf0f4 100644 --- a/file.php +++ b/file.php @@ -15,7 +15,10 @@ error("This script DEPENDS on PATH_INFO being available. Read the README."); } - $args = get_slash_arguments(); + if (! $args = get_slash_arguments()) { + error("No valid arguments supplied"); + } + $numargs = count($args); $courseid = (integer)$args[0]; diff --git a/user/pix.php b/user/pix.php index bcc1375d96..d81853d004 100644 --- a/user/pix.php +++ b/user/pix.php @@ -14,7 +14,10 @@ $PATH_INFO = ""; // Will just show default picture } - $args = get_slash_arguments(); + if (! $args = get_slash_arguments()) { + error("No valid arguments supplied"); + } + $numargs = count($args); if ($numargs == 2) {