From 7cf97cfb93bc5677854f0cd4f4ee43a78a6f9e35 Mon Sep 17 00:00:00 2001
From: Nicolas SILOBRE <45969285+ns-info90@users.noreply.github.com>
Date: Sat, 21 May 2022 18:15:44 +0200
Subject: [PATCH 1/2] FIX: warning Php 8
---
htdocs/core/class/html.formfile.class.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index cbaf59bd311..0e622f897f0 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -1330,7 +1330,7 @@ class FormFile
if ($file['name'] != '.'
&& $file['name'] != '..'
&& !preg_match('/\.meta$/i', $file['name'])) {
- if ($filearray[$key]['rowid'] > 0) {
+ if (array_key_exists('rowid',$filearray[$key]) && $filearray[$key]['rowid'] > 0) {
$lastrowid = $filearray[$key]['rowid'];
}
$filepath = $relativepath.$file['name'];
@@ -1339,8 +1339,8 @@ class FormFile
$nboflines++;
print ''."\n";
// Do we have entry into database ?
- print ''."\n";
- print '
';
+ print ''."\n";
+ print '
';
// File name
print '';
From aa313f23ad5362dc1b3e8dab6c08dd0ffd9b08a0 Mon Sep 17 00:00:00 2001
From: stickler-ci
Date: Sat, 21 May 2022 16:26:20 +0000
Subject: [PATCH 2/2] Fixing style errors.
---
htdocs/core/class/html.formfile.class.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 0e622f897f0..cb8c70f6e49 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -1330,7 +1330,7 @@ class FormFile
if ($file['name'] != '.'
&& $file['name'] != '..'
&& !preg_match('/\.meta$/i', $file['name'])) {
- if (array_key_exists('rowid',$filearray[$key]) && $filearray[$key]['rowid'] > 0) {
+ if (array_key_exists('rowid', $filearray[$key]) && $filearray[$key]['rowid'] > 0) {
$lastrowid = $filearray[$key]['rowid'];
}
$filepath = $relativepath.$file['name'];
@@ -1339,8 +1339,8 @@ class FormFile
$nboflines++;
print ''."\n";
// Do we have entry into database ?
- print ''."\n";
- print '';
+ print ''."\n";
+ print ' ';
// File name
print '| ';
| |