From cca9dd6c81e47bbc967b7d162f15bba4a8e52f66 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sat, 27 Aug 2022 05:49:28 +0200 Subject: [PATCH] PHP8 Warnings --- htdocs/core/lib/takepos.lib.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/takepos.lib.php b/htdocs/core/lib/takepos.lib.php index d8c380a0411..049c2308a22 100644 --- a/htdocs/core/lib/takepos.lib.php +++ b/htdocs/core/lib/takepos.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2022 Alexandre Spangaro + * Copyright (C) 2022 Alexandre Spangaro * * 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 @@ -54,8 +54,7 @@ function takepos_admin_prepare_head() $head[$h][2] = 'bar'; $h++; - $numterminals = !empty($conf->global->TAKEPOS_NUM_TERMINALS) ? $conf->global->TAKEPOS_NUM_TERMINALS : 1; - $numterminals = max(1, $numterminals); + $numterminals = max(1, getDolGlobalInt('TAKEPOS_NUM_TERMINALS', 1)); for ($i = 1; $i <= $numterminals; $i++) { $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/terminal.php?terminal='.$i; $head[$h][1] = $langs->trans("Terminal")." ".$i;