From 6edf40ee96a754512bde275df7d684337efc0b0f Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Fri, 10 Jan 2014 17:48:38 +0000 Subject: [PATCH] When $TMPDIR is low on space PHP streams silently fail --- src/Composer/Util/RemoteFilesystem.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index d3ecec03d..9f0235b06 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/src/Composer/Util/RemoteFilesystem.php @@ -179,6 +179,10 @@ class RemoteFilesystem // work around issue with gzuncompress & co that do not work with all gzip checksums $result = file_get_contents('compress.zlib://data:application/octet-stream;base64,'.base64_encode($result)); } + + if (!$result) { + throw new TransportException('Failed to decode zlib stream'); + } } }