From 9d7543cee9542faf9e130c4891a3279434cb5395 Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Fri, 2 Jun 2023 12:40:26 +0100 Subject: [PATCH] Fix filesize() call on non-existing file --- wp-mat.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-mat.php b/wp-mat.php index 73df700..ef3585d 100644 --- a/wp-mat.php +++ b/wp-mat.php @@ -3,7 +3,7 @@ * Plugin Name: wp-mat * Plugin URI: https://git.autistici.org/noblogs/wp-mat * Description: Process uploaded files through MAT - * Version: 0.0.10 + * Version: 0.0.11 * Author: Autistici/Inventati * Author URI: https://www.autistici.org/ * License: MIT @@ -82,7 +82,7 @@ function wp_mat_handle_upload_prefilter($file) { "name" => $file['name'], "type" => $file['type'], "tmp_name" => $file['tmp_name'], - "size" => filesize($new_tmp_file), + "size" => filesize($file['tmp_name']), "error" => 0, ); error_log("wp-mat: successfully cleaned file=".json_encode($new_file)); -- GitLab