From b1780a35bc4c4bb9b42d6b1454d3a9948fc39b7c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 7 Oct 2021 12:17:33 +0200 Subject: [PATCH] fix Api\Storage\Merge::document_editable_action(): Argument #1 ($action) must be of type array, null given --- api/src/Storage/Merge.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/api/src/Storage/Merge.php b/api/src/Storage/Merge.php index ca01c49612..1c1f0d9742 100644 --- a/api/src/Storage/Merge.php +++ b/api/src/Storage/Merge.php @@ -2254,16 +2254,19 @@ abstract class Merge switch($count) { case (count($name_arr) - 1): - $current_level[$prefix . $file['name']]; + if (!isset($current_level[$prefix . $file['name']])) + { + $current_level[$prefix . $file['name']] = []; + } self::document_editable_action($current_level[$prefix . $file['name']], $file); - if($file['mime'] == 'message/rfc822') + if ($file['mime'] === 'message/rfc822') { self::document_mail_action($current_level[$prefix . $file['name']], $file); } break; default: - if(!is_array($current_level[$prefix . $name_arr[$count]])) + if (!isset($current_level[$prefix . $name_arr[$count]])) { // create parent folder $current_level[$prefix . $name_arr[$count]] = array(