diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-03-08 23:24:44 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-03-08 23:24:44 +0100 |
commit | c0200bc5c3268ae771a75c18f2f9694e79d14a67 (patch) | |
tree | fe08773b088db5ece4742c3f04cfa37389373097 /apps | |
parent | 8c8ff0eae739206afe14c454df9790d27f303318 (diff) | |
download | nextcloud-server-c0200bc5c3268ae771a75c18f2f9694e79d14a67.tar.gz nextcloud-server-c0200bc5c3268ae771a75c18f2f9694e79d14a67.zip |
Use "hasKey" instead of checking the value
If the check is negative it would depending on the used cache store the value as an empty string. When reading the value this check would thus return "false" even if a value exists.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/external/storage.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php index 87f5a3598fb..80ab006f1ca 100644 --- a/apps/files_sharing/lib/external/storage.php +++ b/apps/files_sharing/lib/external/storage.php @@ -253,8 +253,8 @@ class Storage extends DAV implements ISharedStorage { */ private function testRemoteUrl($url) { $cache = $this->memcacheFactory->create('files_sharing_remote_url'); - if($result = $cache->get($url)) { - return (bool)$result; + if($cache->hasKey($url)) { + return (bool)$cache->get($url); } $result = file_get_contents($url); |