From 55b8ac31072988b60472421d2d6fd93567c07cc0 Mon Sep 17 00:00:00 2001 From: martin <martin> Date: Thu, 5 Sep 2002 11:56:20 +0000 Subject: [PATCH] Better error message when invalid arguments are supplied. --- file.php | 5 ++++- user/pix.php | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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) { -- 2.39.5