diff options
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r-- | phpBB/includes/functions_admin.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index ff291fbe8a..41999bdbb0 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -913,7 +913,13 @@ function delete_attachments($mode, $ids, $resync = true) { global $db, $config; - if (is_array($ids) && sizeof($ids)) + // 0 is as bad as an empty array + if (empty($ids)) + { + return false; + } + + if (is_array($ids)) { $ids = array_unique($ids); $ids = array_map('intval', $ids); @@ -923,11 +929,6 @@ function delete_attachments($mode, $ids, $resync = true) $ids = array((int) $ids); } - if (!sizeof($ids)) - { - return false; - } - $sql_where = ''; switch ($mode) |