From ab0a730d4a0b6395ca3dd7155f5f4ccbcc05d75a Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Thu, 29 Jun 2017 02:54:56 +0200
Subject: [PATCH] Fix bad GETPOST on 'action'

---
 htdocs/accountancy/bookkeeping/card.php   | 2 +-
 htdocs/accountancy/report/result.php      | 2 +-
 htdocs/core/class/html.formmail.class.php | 2 +-
 htdocs/loan/createschedule.php            | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php
index 28b7b177860..9be65e7261a 100644
--- a/htdocs/accountancy/bookkeeping/card.php
+++ b/htdocs/accountancy/bookkeeping/card.php
@@ -37,7 +37,7 @@ $id = GETPOST('id', 'int');
 if ($user->societe_id > 0) {
 	accessforbidden();
 }
-$action = GETPOST('action');
+$action = GETPOST('action','aZ09');
 $mode = GETPOST('mode');
 $piece_num = GETPOST("piece_num");
 
diff --git a/htdocs/accountancy/report/result.php b/htdocs/accountancy/report/result.php
index 175c9955498..b8335e2d8f7 100644
--- a/htdocs/accountancy/report/result.php
+++ b/htdocs/accountancy/report/result.php
@@ -36,7 +36,7 @@ $langs->load("accountancy");
 $langs->load("compta");
 
 $mesg = '';
-$action = GETPOST('action');
+$action = GETPOST('action','aZ09');
 $cat_id = GETPOST('account_category');
 $selectcpt = GETPOST('cpt_bk');
 $id = GETPOST('id', 'int');
diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index d6089ebdb54..c33b798c3a9 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -529,7 +529,7 @@ class FormMail extends Form
         				    $tmparray[$key]=dol_htmlentities($tmparray[$key], null, 'UTF-8', true);
         				}
         				$withtoselected=GETPOST("receiver");     // Array of selected value
-        				if (empty($withtoselected) && count($tmparray) == 1 && GETPOST('action') == 'presend')
+        				if (empty($withtoselected) && count($tmparray) == 1 && GETPOST('action','aZ09') == 'presend')
         				{
         				    $withtoselected = array_keys($tmparray);
         				}
diff --git a/htdocs/loan/createschedule.php b/htdocs/loan/createschedule.php
index 596cc9fd536..70688461ae9 100644
--- a/htdocs/loan/createschedule.php
+++ b/htdocs/loan/createschedule.php
@@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/loan/class/loanschedule.class.php';
 global $user;
 
 $loanid = GETPOST('loanid', 'int');
-$action = GETPOST('action');
+$action = GETPOST('action','aZ09');
 
 $object = new Loan($db);
 $object->fetch($loanid);
-- 
GitLab