From d4d89b6bfb7a297dfa2a46c1370edaae6b160b7d Mon Sep 17 00:00:00 2001 From: John BOTELLA Date: Wed, 3 Jan 2024 14:53:31 +0100 Subject: [PATCH] fix warning php 8.2 --- htdocs/core/class/html.formfile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 024e67bb371..5262e6ba369 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1214,7 +1214,7 @@ class FormFile } } // For backward compatiblity, we detect file stored into an old path - if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO') && $filearray[0]['level1name'] == 'photos') { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO') && isset($filearray[0]) && $filearray[0]['level1name'] == 'photos') { $relativepath = preg_replace('/^.*\/produit\//', '', $filearray[0]['path']).'/'; }