Skip to content

Commit

Permalink
Better error message when invalid arguments are supplied.
Browse files Browse the repository at this point in the history
  • Loading branch information
martin committed Sep 5, 2002
1 parent e2d8972 commit 55b8ac3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion file.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down
5 changes: 4 additions & 1 deletion user/pix.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 55b8ac3

Please sign in to comment.