>From 0f312945eabb78f4ac5f6703ffa943ca4296e5ca Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Mon, 7 Jan 2019 16:55:56 +0100 Subject: [PATCH 2/2] do not use empty because of account could be '0 = zero' --- htdocs/accountancy/class/bookkeeping.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 70934e01ed..b7c7f94e9b 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -3,6 +3,7 @@ * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2015-2017 Florian Henry * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018 Eric Seigne * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -221,7 +222,7 @@ class BookKeeping extends CommonObject if (empty($this->credit)) $this->credit = 0; // Check parameters - if (empty($this->numero_compte) || $this->numero_compte == '-1' || $this->numero_compte == 'NotDefined') + if (($this->numero_compte == "") || $this->numero_compte == '-1' || $this->numero_compte == 'NotDefined') { $langs->loadLangs(array("errors")); if (in_array($this->doc_type, array('bank', 'expense_report'))) -- 2.11.0