From b57d51fc418c8e619c8b6cd051a34574c4850268 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 11 Mar 2015 10:55:11 +0000 Subject: [PATCH] routeSQL : allow the parameters to be missing without error git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2003 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- routeSQL.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routeSQL.php b/routeSQL.php index 40daed0..65a94a5 100644 --- a/routeSQL.php +++ b/routeSQL.php @@ -160,8 +160,8 @@ class routeSQL $token = $csrf->createToken (); $datas = $this->objectDB->read (); $titles = $this->objectDB->titles (); - if ($page === null || $page === "") $page = 1; - if ($num === null || $num === "") $num = 10; + if (!isset ($page) || $page === null || $page === "") $page = 1; + if (!isset ($num) || $num === null || $num === "") $num = 10; $page = intval ($page); $num = intval ($num); if ($num > 1000)