Change for with count.

This commit is contained in:
Vasily Komrakov 2017-05-07 20:59:35 +03:00
commit 56540c893a
No known key found for this signature in database
GPG key ID: 558236680C20A69A
16 changed files with 73 additions and 73 deletions

View file

@ -187,7 +187,7 @@ function delete_attachment($post_id_array = 0, $attach_id_array = 0, $page = 0,
}
//bt end
for ($i = 0; $i < count($attach_id_array); $i++) {
for ($i = 0, $iMax = count($attach_id_array); $i < $iMax; $i++) {
$sql = 'SELECT attach_id
FROM ' . BB_ATTACHMENTS . '
WHERE attach_id = ' . (int)$attach_id_array[$i];