From dc6ee05fb9f790b4b8d8e71748bc900219a4f964 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sun, 5 Nov 2023 01:46:44 +0700 Subject: [PATCH] Update posting_attachments.php --- library/attach_mod/posting_attachments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/attach_mod/posting_attachments.php b/library/attach_mod/posting_attachments.php index 1bcde102..5429c485 100644 --- a/library/attach_mod/posting_attachments.php +++ b/library/attach_mod/posting_attachments.php @@ -929,7 +929,7 @@ class attach_parent //bt // Block uploading more than one torrent file - $uploaded_torrents = isset(array_count_values($this->attachment_extension_list)[TORRENT_EXT]) ? array_count_values($this->attachment_extension_list)[TORRENT_EXT] : 0; + $uploaded_torrents = isset(array_count_values($this->attachment_extension_list)[TORRENT_EXT]) ? (int) array_count_values($this->attachment_extension_list)[TORRENT_EXT] : 0; if (!$error && $this->extension === TORRENT_EXT && ($uploaded_torrents >= 1)) { $error = TRUE;