From: Aaron Schulz Date: Sun, 9 Sep 2012 17:54:16 +0000 (-0700) Subject: [FileBackend] Treat NoSuchObjectException as a normal error in streamFile(). X-Git-Tag: 1.31.0-rc.0~22417^2 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=354882095bdd59af3fc066421816bad3fa6be064;p=lhc%2Fweb%2Fwiklou.git [FileBackend] Treat NoSuchObjectException as a normal error in streamFile(). Change-Id: I6b64e524a7f3cba6cabe5282f5915cd05dbf8ad0 --- diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php index ab8610730d..2cedb62061 100644 --- a/includes/filebackend/SwiftFileBackend.php +++ b/includes/filebackend/SwiftFileBackend.php @@ -1023,6 +1023,8 @@ class SwiftFileBackend extends FileBackendStore { $output = fopen( 'php://output', 'wb' ); $obj = new CF_Object( $cont, $srcRel, false, false ); // skip HEAD $obj->stream( $output, $this->headersFromParams( $params ) ); + } catch ( NoSuchObjectException $e ) { + $status->fatal( 'backend-fail-stream', $params['src'] ); } catch ( CloudFilesException $e ) { // some other exception? $this->handleException( $e, $status, __METHOD__, $params ); }