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;