From 354882095bdd59af3fc066421816bad3fa6be064 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 9 Sep 2012 10:54:16 -0700 Subject: [PATCH] [FileBackend] Treat NoSuchObjectException as a normal error in streamFile(). Change-Id: I6b64e524a7f3cba6cabe5282f5915cd05dbf8ad0 --- includes/filebackend/SwiftFileBackend.php | 2 ++ 1 file changed, 2 insertions(+) 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 ); } -- 2.20.1