From d09fc0fe1edacc3735ea39f931a5f7c0503b9a12 Mon Sep 17 00:00:00 2001 From: Leander Date: Mon, 27 Mar 2017 16:05:12 +0200 Subject: [PATCH] T1703271605 --- start.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/start.php b/start.php index 25bb11b..ed9a61c 100644 --- a/start.php +++ b/start.php @@ -11,7 +11,8 @@ $error = 0; $values = null; $uid = $_GET['uid']; - $length = ($_GET['length'] && gettype(+$_GET['length']) == 'integer') ? +$_GET['length'] : 10; + $length = $_GET['length']; + $length = (($length === '0') || ($length && gettype(+$length) == 'integer')) ? +$_GET['length'] : 10; $database = new Database(); $questions_count = $database->query('SELECT COUNT(*) FROM "Questions"')['data'][0]['count']; if($length == 0) {