From: Aaron Schulz Date: Mon, 4 Nov 2013 17:40:56 +0000 (-0800) Subject: Catch all stash errors in cleanup script X-Git-Tag: 1.31.0-rc.0~18300^2 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=de1d3b611dc31d44212643abd7710bfd9ab99533;p=lhc%2Fweb%2Fwiklou.git Catch all stash errors in cleanup script bug: 56401 Change-Id: I3dcd8728a46fdcbecbda0bdc6e3aef49e8f41ed8 --- 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" );