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
This commit is contained in:
2015-03-11 10:55:11 +00:00
parent a50b19480e
commit b57d51fc41

View File

@@ -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)