From 685b8bce90024bf270610179f98daa2ed939ddac Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Fri, 2 Jun 2023 12:26:34 +0100
Subject: [PATCH] Debug wp_handle_upload_error

---
 wp-mat.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/wp-mat.php b/wp-mat.php
index 9c7700a..73df700 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.9
+ * Version: 0.0.10
  * Author: Autistici/Inventati
  * Author URI: https://www.autistici.org/
  * License: MIT
@@ -96,3 +96,8 @@ function wp_mat_handle_upload_prefilter($file) {
 }
 
 add_filter('wp_handle_upload_prefilter', 'wp_mat_handle_upload_prefilter');
+
+function wp_handle_upload_error(&$file, $message) {
+    error_log("wp_handle_upload_error: ".$message);
+    return array( "error" => $message );
+}
-- 
GitLab