mirror of
https://github.com/nextcloud/server.git
synced 2026-03-25 20:03:23 -04:00
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.
This commit is contained in:
parent
8c8ff0eae7
commit
c0200bc5c3
1 changed files with 2 additions and 2 deletions
4
apps/files_sharing/lib/external/storage.php
vendored
4
apps/files_sharing/lib/external/storage.php
vendored
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue