From 6f9305cb589185cdf2776d8dee357f7553a05f83 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 29 Aug 2022 05:18:15 +0200 Subject: [PATCH] PHP8 Warning --- htdocs/accountancy/admin/categories.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index 39aa21f2d63..68d4c03e0a6 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -1,6 +1,6 @@ - * Copyright (C) 2017 Alexandre Spangaro +/* Copyright (C) 2016 Jamal Elbaz + * Copyright (C) 2017-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 @@ -124,7 +124,8 @@ if (!empty($cat_id)) { $arraykeyvalue = array(); foreach ($accountingcategory->lines_cptbk as $key => $val) { - $arraykeyvalue[length_accountg($val->numero_compte)] = length_accountg($val->numero_compte).' ('.$val->label_compte.($val->doc_ref ? ' '.$val->doc_ref : '').')'; + $doc_ref = !empty($val->doc_ref) ? $val->doc_ref : ''; + $arraykeyvalue[length_accountg($val->numero_compte)] = length_accountg($val->numero_compte) . ' - ' . $val->label_compte . $doc_ref; } if (is_array($accountingcategory->lines_cptbk) && count($accountingcategory->lines_cptbk) > 0) {