Browse Source

Don't use `empty()` with a return value, PHP 5.4

remotes/origin/add-bruteforce-protection
Robin McCorkell 10 years ago
parent
commit
6907a88d14
  1. 4
      apps/files_external/service/backendservice.php

4
apps/files_external/service/backendservice.php

@ -140,7 +140,7 @@ class BackendService {
*/ */
public function getAvailableBackends() { public function getAvailableBackends() {
return array_filter($this->getBackends(), function($backend) { return array_filter($this->getBackends(), function($backend) {
return empty($backend->checkDependencies());
return !($backend->checkDependencies());
}); });
} }
@ -256,7 +256,7 @@ class BackendService {
*/ */
protected function isAllowedUserBackend(Backend $backend) { protected function isAllowedUserBackend(Backend $backend) {
if ($this->userMountingAllowed && if ($this->userMountingAllowed &&
!empty(array_intersect($backend->getIdentifierAliases(), $this->userMountingBackends))
array_intersect($backend->getIdentifierAliases(), $this->userMountingBackends)
) { ) {
return true; return true;
} }

Loading…
Cancel
Save