diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-04-27 09:56:05 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-04-27 09:56:05 +0200 |
commit | 546d94c3ec5b0cb06cc284dead0da98ee346fc81 (patch) | |
tree | f64015e26506776e16ce679e61f4e8571e92b7af /lib/private/Files/Storage | |
parent | 5e96228eb1f7999a327dacab22055ec2aa8e28a3 (diff) | |
download | nextcloud-server-546d94c3ec5b0cb06cc284dead0da98ee346fc81.tar.gz nextcloud-server-546d94c3ec5b0cb06cc284dead0da98ee346fc81.zip |
Fix file_get_content signatures to make it clear it can return false
In File::getContent, which must return a string, throw an Exception
instead of returning false.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/Files/Storage')
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Encoding.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Encryption.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Jail.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Wrapper.php | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Encoding.php b/lib/private/Files/Storage/Wrapper/Encoding.php index dd699993e84..6633cbf41e3 100644 --- a/lib/private/Files/Storage/Wrapper/Encoding.php +++ b/lib/private/Files/Storage/Wrapper/Encoding.php @@ -300,7 +300,7 @@ class Encoding extends Wrapper { * see https://www.php.net/manual/en/function.file_get_contents.php * * @param string $path - * @return string|bool + * @return string|false */ public function file_get_contents($path) { return $this->storage->file_get_contents($this->findPathToUse($path)); diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php index 720111793de..9c0e6c91463 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -217,7 +217,7 @@ class Encryption extends Wrapper { * see https://www.php.net/manual/en/function.file_get_contents.php * * @param string $path - * @return string + * @return string|false */ public function file_get_contents($path) { $encryptionModule = $this->getEncryptionModule($path); diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php index 619d8b07137..caf039d4cca 100644 --- a/lib/private/Files/Storage/Wrapper/Jail.php +++ b/lib/private/Files/Storage/Wrapper/Jail.php @@ -248,7 +248,7 @@ class Jail extends Wrapper { * see https://www.php.net/manual/en/function.file_get_contents.php * * @param string $path - * @return string|bool + * @return string|false */ public function file_get_contents($path) { return $this->getWrapperStorage()->file_get_contents($this->getUnjailedPath($path)); diff --git a/lib/private/Files/Storage/Wrapper/Wrapper.php b/lib/private/Files/Storage/Wrapper/Wrapper.php index 28a1e0b1e4d..9f5564b4490 100644 --- a/lib/private/Files/Storage/Wrapper/Wrapper.php +++ b/lib/private/Files/Storage/Wrapper/Wrapper.php @@ -238,7 +238,7 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IWriteStrea * see https://www.php.net/manual/en/function.file_get_contents.php * * @param string $path - * @return string|bool + * @return string|false */ public function file_get_contents($path) { return $this->getWrapperStorage()->file_get_contents($path); |