From 21b8b7d0e7765c672a6df5084493cf5cedbcb321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 30 Nov 2016 12:43:14 +0100 Subject: [PATCH] Honor false return value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue #12755 Signed-off-by: Michal Čihař --- libraries/File.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libraries/File.php b/libraries/File.php index 64259ca9f5..3b7725db6d 100644 --- a/libraries/File.php +++ b/libraries/File.php @@ -197,7 +197,11 @@ class File */ public function getContent() { - return '0x' . bin2hex($this->getRawContent()); + $result = $this->getRawContent(); + if ($result === false) { + return false; + } + return '0x' . bin2hex($result); } /** @@ -810,4 +814,4 @@ class File { return strlen($this->_content); } -} \ No newline at end of file +}