From 7b8d1abfcfb7cd4b04739e73f438f0fee760d01e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 16 Mar 2021 18:04:51 +0100 Subject: [PATCH] fix php8 warnings --- htdocs/accountancy/bookkeeping/list.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 8ca4175f87f..39906b09bb3 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -3,7 +3,7 @@ * Copyright (C) 2013-2016 Florian Henry * Copyright (C) 2013-2020 Alexandre Spangaro * Copyright (C) 2016-2017 Laurent Destailleur - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2021 Frédéric France * * 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 @@ -471,7 +471,7 @@ if (count($filter) > 0) { } } $sql .= ' WHERE t.entity IN ('.getEntity('accountancy').')'; -if ($conf->global->ACCOUNTING_REEXPORT == 0) { +if (empty($conf->global->ACCOUNTING_REEXPORT)) { $sql .= " AND t.date_export IS NULL"; } if (count($sqlwhere) > 0) { @@ -487,7 +487,7 @@ if (!empty($sortfield)) { // Must be after definition of $sql if ($action == 'export_fileconfirm' && $user->rights->accounting->mouvements->export) { // TODO Replace the fetchAll + ->export later that consume too much memory on large export with the query($sql) and loop on each line to export them. - $result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', $conf->global->ACCOUNTING_REEXPORT); + $result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', (empty($conf->global->ACCOUNTING_REEXPORT) ? 0 : 1)); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors');