Skip to content

Commit

Permalink
Merge pull request #1453 from liip/fix/file-get-contents-can-false
Browse files Browse the repository at this point in the history
file_get_contents might return false. related to #1452
  • Loading branch information
dbu committed Feb 9, 2022
2 parents 2d6c47c + 6d8b97a commit a77cd62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Binary/BinaryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
interface BinaryInterface
{
/**
* @return string
* @return string|false
*/
public function getContent();

Expand Down
4 changes: 3 additions & 1 deletion Model/FileBinary.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ public function __construct($path, $mimeType, $format = null)
}

/**
* @return string
* TODO: in version 3, restrict return type to string and throw an exception when file_get_contents fails.
*
* @return string|false
*/
public function getContent()
{
Expand Down

0 comments on commit a77cd62

Please sign in to comment.