diff options
author | Andreas Fischer <bantu@phpbb.com> | 2010-02-23 19:07:25 +0000 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2010-02-23 19:07:25 +0000 |
commit | d3459b3f493ddd06b51f345897dc99368a328326 (patch) | |
tree | 96656bc10a1758a26d1d134f02d25114736bcdf1 /phpBB/includes/functions_admin.php | |
parent | 63e07777cd9a5d7ef68693fa7c9098e46493965c (diff) | |
download | forums-d3459b3f493ddd06b51f345897dc99368a328326.tar forums-d3459b3f493ddd06b51f345897dc99368a328326.tar.gz forums-d3459b3f493ddd06b51f345897dc99368a328326.tar.bz2 forums-d3459b3f493ddd06b51f345897dc99368a328326.tar.xz forums-d3459b3f493ddd06b51f345897dc99368a328326.zip |
Merge r10526 into 3.0.7 branch.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_7@10527 89ea8834-ac86-4346-8a33-228a782c2dd0
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) |