From 8a9b6591a88fa353a75ae646e9b22c90fa6757bd Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 26 Jun 2016 19:15:19 +0200 Subject: [PATCH] fix some scrutinizer "bugs" --- api/src/Ldap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Ldap.php b/api/src/Ldap.php index abd2f157db..f6c1badf10 100644 --- a/api/src/Ldap.php +++ b/api/src/Ldap.php @@ -227,7 +227,7 @@ class Ldap $host = parse_url($host,PHP_URL_HOST); } // connect to ldap server (never fails, as connection happens in bind!) - if(!($this->ds = !empty($port) ? ldap_connect($host, $port) : ldap_connect($host))) + if(!$host || !($this->ds = !empty($port) ? ldap_connect($host, $port) : ldap_connect($host))) { return False; }