From: Jerome Jutteau Date: Thu, 19 Nov 2020 21:30:00 +0000 (+0100) Subject: [BUGFIX] avoid php warning because async file does not exist yet X-Git-Tag: 4.2.0~8 X-Git-Url: https://git.p6c8.net/jirafeau.git/commitdiff_plain/1203cc4e9094fa86f7978c9da56f454d4c21ca32 [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 --- 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)) {