diff options
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r-- | phpBB/includes/message_parser.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index ea28061da0..fda31a20e3 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -1370,9 +1370,10 @@ class parse_message extends bbcode_firstpass { include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx); - $index = (int) key($_POST['delete_file']); + $index = array_keys(request_var('delete_file', array(0 => 0))); + $index = (!empty($index[0])) ? $index[0] : false; - if (!empty($this->attachment_data[$index])) + if ($index !== false && !empty($this->attachment_data[$index])) { // delete selected attachment if ($this->attachment_data[$index]['is_orphan']) |