From 1203cc4e9094fa86f7978c9da56f454d4c21ca32 Mon Sep 17 00:00:00 2001 From: Jerome Jutteau Date: Thu, 19 Nov 2020 22:30:00 +0100 Subject: [PATCH] [BUGFIX] avoid php warning because async file does not exist yet Each time an async file is pushed, its size is check in order to not get over a maximal_upload_size option. On the first push, the destination file does not exist and this generates a warning. closes #238 Signed-off-by: Jerome Jutteau --- lib/functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/functions.php b/lib/functions.php index 5f43066..34c7df8 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -866,6 +866,10 @@ function jirafeau_async_init($filename, $type, $one_time, $key, $time, $ip) return; } + /* touch empty data file */ + $w_path = $p . $ref . '_data'; + touch($w_path); + /* md5 password or empty */ $password = ''; if (!empty($key)) { -- 2.34.1