From 597537daf2825ed092c3bb71a40b8cd2db2ceca5 Mon Sep 17 00:00:00 2001 From: "J.Cattan" Date: Sat, 5 Oct 2024 15:55:21 +0200 Subject: [PATCH] Update epm_system.class.php error : "tempnam(): file created in the system's temporary directory" with php 7.4 --- lib/epm_system.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/epm_system.class.php b/lib/epm_system.class.php index 5c310874..4fb16bed 100644 --- a/lib/epm_system.class.php +++ b/lib/epm_system.class.php @@ -272,7 +272,7 @@ function sys_get_temp_dir() { if (!empty($_ENV['TEMP'])) { return realpath($_ENV['TEMP']); } - $tempfile = tempnam(uniqid(rand(), TRUE), ''); + $tempfile = tempnam(sys_get_temp_dir(), 'prefix_'); if (file_exists($tempfile)) { unlink($tempfile); return realpath(dirname($tempfile));