From cca4bef00b6c5e2abf3c795fb75d97878afd4d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Fri, 15 Mar 2024 08:06:27 +0100 Subject: [PATCH 1/2] fix warning --- htdocs/compta/facture/prelevement.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 33ec278f6465d..c2d13c792c231 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2017 Ferran Marcet - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2024 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 @@ -314,7 +314,7 @@ } $author = new User($db); - if ($object->fk_user_author) { + if (!empty($object->fk_user_author)) { $author->fetch($object->fk_user_author); } From b1ce17dd4e7bec29d8d6df55fa89806010f7cc33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Fri, 15 Mar 2024 08:09:50 +0100 Subject: [PATCH 2/2] fix warning --- htdocs/compta/facture/prelevement.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index c2d13c792c231..2371f6ff59a71 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -314,7 +314,9 @@ } $author = new User($db); - if (!empty($object->fk_user_author)) { + if (!empty($object->user_creation_id)) { + $author->fetch($object->user_creation_id); + } elseif (!empty($object->fk_user_author)) { $author->fetch($object->fk_user_author); }