Have get_arg never return null
90% of places assume it will never return null, and they will break in weird ways if it does return null
This commit is contained in:
@ -53,10 +53,7 @@ class UserPage extends Extension
|
||||
} elseif ($event->get_arg(0) == "list") {
|
||||
$limit = 50;
|
||||
|
||||
$page_num = int_escape($event->get_arg(1));
|
||||
if ($page_num <= 0) {
|
||||
$page_num = 1;
|
||||
}
|
||||
$page_num = $event->try_page_num(1);
|
||||
$offset = ($page_num-1) * $limit;
|
||||
|
||||
$q = "WHERE 1=1";
|
||||
|
Reference in New Issue
Block a user