Fixed FileOp::attemptBatch() behavior when unexpected failures occur with the 'force...
authorAaron Schulz <aaron@users.mediawiki.org>
Tue, 6 Mar 2012 22:59:59 +0000 (22:59 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Tue, 6 Mar 2012 22:59:59 +0000 (22:59 +0000)
includes/filerepo/backend/FileOp.php

index 53dc8e4..ad30f0f 100644 (file)
@@ -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
                        }
                }