From 302cc62a77f517f2a9bea3394f2aed2e1d95f698 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 6 Mar 2012 22:59:59 +0000 Subject: [PATCH] Fixed FileOp::attemptBatch() behavior when unexpected failures occur with the 'force' option. It can't continue on since the ops assumed that $predicates was correct, which it won't be. It now simply halts operations. --- includes/filerepo/backend/FileOp.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/includes/filerepo/backend/FileOp.php b/includes/filerepo/backend/FileOp.php index 53dc8e41d5..ad30f0f6d2 100644 --- a/includes/filerepo/backend/FileOp.php +++ b/includes/filerepo/backend/FileOp.php @@ -134,13 +134,12 @@ abstract class FileOp { } else { $status->success[$index] = false; ++$status->failCount; - if ( !$ignoreErrors ) { - // Log remaining ops as failed for recovery... - for ( $i = ($index + 1); $i < count( $performOps ); $i++ ) { - $performOps[$i]->logFailure( 'attempt_aborted' ); - } - return $status; // bail out + // We can't continue (even with $ignoreErrors) as $predicates is wrong. + // Log the remaining ops as failed for recovery... + for ( $i = ($index + 1); $i < count( $performOps ); $i++ ) { + $performOps[$i]->logFailure( 'attempt_aborted' ); } + return $status; // bail out } } -- 2.20.1