From d9d4b6e06db729dbc294ff05359cfdd6d6a31b1e Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 26 Oct 2017 13:03:39 +0200 Subject: [PATCH 1/2] Fix : Warning: A non-numeric value encountered in on line 57 58 59 --- htdocs/fourn/facture/document.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index 6926770bd91..818c016de04 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -54,6 +54,7 @@ $page = GETPOST("page",'int'); if ($page == -1) { $page = 0; } +$page = (is_numeric($page) ? $page : 0); $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; From 61909d842def3478e70aff51f8dfa63dfb794eb0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 27 Oct 2017 02:18:11 +0200 Subject: [PATCH 2/2] Update document.php --- htdocs/fourn/facture/document.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index 818c016de04..180e72e8262 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -51,10 +51,7 @@ $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); -if ($page == -1) { - $page = 0; -} -$page = (is_numeric($page) ? $page : 0); +if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1;