From 854e284d42132207f8592b8883396fb961bb40e3 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 18 Sep 2014 15:18:01 +0200 Subject: [PATCH] autologin: Don't use `count()' for is empty checks Using `count()' in favor of `empty()' for empty checks on arrays is bad habit. While there's literally no performance gain in the "fixed" scenario, there's one on large arrays and thus should be avoided everywhere. refs #6462 --- library/Icinga/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/User.php b/library/Icinga/User.php index da894151f..71e4b47e4 100644 --- a/library/Icinga/User.php +++ b/library/Icinga/User.php @@ -446,7 +446,7 @@ class User */ public function isRemoteUser() { - return (count($this->remoteUserInformation)) ? true : false; + return ! empty($this->remoteUserInformation); } /**