From de1d3b611dc31d44212643abd7710bfd9ab99533 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 4 Nov 2013 09:40:56 -0800 Subject: [PATCH] Catch all stash errors in cleanup script bug: 56401 Change-Id: I3dcd8728a46fdcbecbda0bdc6e3aef49e8f41ed8 --- maintenance/cleanupUploadStash.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/maintenance/cleanupUploadStash.php b/maintenance/cleanupUploadStash.php index c2ba555867..ba7c3cf60e 100644 --- a/maintenance/cleanupUploadStash.php +++ b/maintenance/cleanupUploadStash.php @@ -81,10 +81,9 @@ class UploadStashCleanup extends Maintenance { try { $stash->getFile( $key, true ); $stash->removeFileNoAuth( $key ); - } catch ( UploadStashBadPathException $ex ) { - $this->output( "Failed removing stashed upload with key: $key\n" ); - } catch ( UploadStashZeroLengthFileException $ex ) { - $this->output( "Failed removing stashed upload with key: $key\n" ); + } catch ( UploadStashException $ex ) { + $type = get_class( $ex ); + $this->output( "Failed removing stashed upload with key: $key ($type)\n" ); } if ( $i % 100 == 0 ) { $this->output( "$i\n" ); -- 2.20.1