From 8792ed3dc496a647f5ec620080d1de41a086b12b Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Thu, 27 Oct 2022 15:38:47 +0200 Subject: [PATCH] fix(abstractitiltarget): copy may generate unwanted ouput to navigator --- inc/abstractitiltarget.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/abstractitiltarget.class.php b/inc/abstractitiltarget.class.php index 50e91c11d..a1a5fbf75 100644 --- a/inc/abstractitiltarget.class.php +++ b/inc/abstractitiltarget.class.php @@ -2331,7 +2331,7 @@ protected function prepareUploadedFiles(array $data): array { foreach (PluginFormcreatorCommon::getDocumentsFromTag($data['content']) as $document) { $prefix = uniqid('', true); $filename = $prefix . 'image_paste.' . pathinfo($document['filename'], PATHINFO_EXTENSION); - if (!copy(GLPI_DOC_DIR . '/' . $document['filepath'], GLPI_TMP_DIR . '/' . $filename)) { + if (!@copy(GLPI_DOC_DIR . '/' . $document['filepath'], GLPI_TMP_DIR . '/' . $filename)) { continue; }