Honor false return value
Issue #12755 Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
eb0dc51800
commit
21b8b7d0e7
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user