From ce6d1d306d4bcfd3b66319013fd5007bb9ad943e Mon Sep 17 00:00:00 2001 From: gauthier Date: Thu, 26 Oct 2017 11:32:26 +0200 Subject: [PATCH 1/3] FIX : hook formObjectOptions() must use $expe and not $object which is an order here --- htdocs/expedition/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index b2715e7d35a..b29867da547 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -777,7 +777,7 @@ if ($action == 'create') // Other attributes $parameters = array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"', 'socid'=>$socid); - $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$expe,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook) && ! empty($extrafields->attribute_label)) { From d9d4b6e06db729dbc294ff05359cfdd6d6a31b1e Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 26 Oct 2017 13:03:39 +0200 Subject: [PATCH 2/3] 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 3/3] 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;