Permalink
Browse files

Better error message when invalid arguments are supplied.

  • Loading branch information...
1 parent e2d8972 commit 55b8ac31072988b60472421d2d6fd93567c07cc0 martin committed Sep 5, 2002
Showing with 8 additions and 2 deletions.
  1. +4 −1 file.php
  2. +4 −1 user/pix.php
View
@@ -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];
View
@@ -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) {

0 comments on commit 55b8ac3

Please sign in to comment.