From 83e795044f2e78a4ac25600ce27a4a0dfaed6427 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 10 Jun 2021 19:02:19 +0200 Subject: [PATCH] LSattr_ldap_sambaAcctFlagsparse_flags(): fix handling null|empty value --- src/includes/class/class.LSattr_ldap_sambaAcctFlags.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/includes/class/class.LSattr_ldap_sambaAcctFlags.php b/src/includes/class/class.LSattr_ldap_sambaAcctFlags.php index 4e101a76..01324c77 100644 --- a/src/includes/class/class.LSattr_ldap_sambaAcctFlags.php +++ b/src/includes/class/class.LSattr_ldap_sambaAcctFlags.php @@ -61,6 +61,8 @@ class LSattr_ldap_sambaAcctFlags extends LSattr_ldap { * @retval array Array of enabled flags **/ public static function parse_flags($data) { + if (!$data) + return array(); $data = ensureIsArray($data); if (count($data) > 1) { LSerror :: addErrorCode('LSattr_ldap_sambaAcctFlags_01');