]> git.mjollnir.org Git - moodle.git/commitdiff
Better error message when invalid arguments are supplied.
authormartin <martin>
Thu, 5 Sep 2002 11:56:20 +0000 (11:56 +0000)
committermartin <martin>
Thu, 5 Sep 2002 11:56:20 +0000 (11:56 +0000)
file.php
user/pix.php

index 95e6e8fc6fb2c16c38244c569bae59099c1bc256..78c3ecf0f4cf03ec177397165a5cd2a8889028e6 100644 (file)
--- a/file.php
+++ b/file.php
         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];
 
index bcc1375d96fd6407074f9e99b2dcb5c67367c47c..d81853d004002b28829f6c92f77fcc74c5248edc 100644 (file)
         $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) {