T201704030953
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
$data = '';
|
||||
$error = 0;
|
||||
$values = null;
|
||||
$uid = $_GET['uid'];
|
||||
$length = $_GET['length'];
|
||||
$uid = isset($_GET['uid']) ? $_GET['uid'] : '';
|
||||
$length = isset($_GET['length']) ? $_GET['length'] : '';
|
||||
$length = (($length === '0') || ($length && gettype(+$length) == 'integer')) ? +$_GET['length'] : 10;
|
||||
$db = new Database();
|
||||
$questions_count = $db->query('SELECT COUNT(*) FROM "Questions"')['data'][0]['count'];
|
||||
@@ -23,7 +23,9 @@
|
||||
return array_slice($numbers, 0, $count-1);
|
||||
}
|
||||
|
||||
if($length == 0) {
|
||||
if($uid = '') {
|
||||
$error = 12103;
|
||||
} else if($length == 0) {
|
||||
$error = 12101;
|
||||
} else if($length > $questions_count) {
|
||||
$error = 12102;
|
||||
|
||||
Reference in New Issue
Block a user