Merge pull request #22974 from owncloud/php-automagics-type-conversion-is-fun

Use "hasKey" instead of checking the value
This commit is contained in:
Thomas Müller 2016-03-09 12:19:45 +01:00
commit 3608421800
1 changed files with 2 additions and 2 deletions

View File

@ -253,8 +253,8 @@ class Storage extends DAV implements ISharedStorage {
*/ */
private function testRemoteUrl($url) { private function testRemoteUrl($url) {
$cache = $this->memcacheFactory->create('files_sharing_remote_url'); $cache = $this->memcacheFactory->create('files_sharing_remote_url');
if($result = $cache->get($url)) { if($cache->hasKey($url)) {
return (bool)$result; return (bool)$cache->get($url);
} }
$result = file_get_contents($url); $result = file_get_contents($url);