Honor false return value

Issue #12755

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2016-11-30 12:43:14 +01:00
parent eb0dc51800
commit 21b8b7d0e7

View File

@ -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);
}
}
}