Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/21/2011 10:27:09 PM (15 years ago)
Author:
djpaul
Message:

Tune up 'for' loops. Fixes #2985, props cnorris23 and r-a-y

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-messages/bp-messages-functions.php

    r4628 r4770  
    136136        if ( is_array( $thread_ids ) ) {
    137137                $error = 0;
    138                 for ( $i = 0; $i < count( $thread_ids ); $i++ ) {
     138                for ( $i = 0, $count = count( $thread_ids ); $i < $count; ++$i ) {
    139139                        if ( !$status = BP_Messages_Thread::delete( $thread_ids[$i]) )
    140140                                $error = 1;
Note: See TracChangeset for help on using the changeset viewer.