T1703271557
This commit is contained in:
@@ -14,9 +14,11 @@
|
||||
$length = ($_GET['length'] && gettype(+$_GET['length']) == 'integer') ? +$_GET['length'] : 10;
|
||||
$database = new Database();
|
||||
$questions_count = $database->query('SELECT COUNT(*) FROM "Questions"')['data'][0]['count'];
|
||||
|
||||
if($length > $questions_count) {
|
||||
if($length = 0) {
|
||||
$error = 12101;
|
||||
}
|
||||
if($length > $questions_count) {
|
||||
$error = 12102;
|
||||
$values = array($questions_count);
|
||||
}
|
||||
$response = Database::create_response($data, $error, $values);
|
||||
|
||||
Reference in New Issue
Block a user