From 9d840d2ba055af5be4ad35eac1533f08ba6faea5 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Thu, 12 Sep 2019 18:47:03 +0200 Subject: [PATCH] Add file with default value 'null' for user id This ensures that the file attachment is added with a reference to the current user. Regression introduced by 255dfdf261c42adb76c4f3b6a157186afe999f9b, caused attachments uploaded together with the issue's submission to be linked to user '0' instead of the reporter. Fixes #26128 --- core/file_api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/file_api.php b/core/file_api.php index 941a653a12..3ba6565a32 100644 --- a/core/file_api.php +++ b/core/file_api.php @@ -78,7 +78,7 @@ function file_attach_files( $p_bug_id, $p_files, $p_bugnote_id = 0 ) { 'bug', '', /* title */ '', /* desc */ - 0, /* user_id */ + null, /* user_id */ 0, /* date_added */ 0, /* skip_bug_update */ $p_bugnote_id );