LSattr_ldap_sambaAcctFlagsparse_flags(): fix handling null|empty value

This commit is contained in:
Benjamin Renard 2021-06-10 19:02:19 +02:00
parent 8dbbda801a
commit 83e795044f

View file

@ -61,6 +61,8 @@ class LSattr_ldap_sambaAcctFlags extends LSattr_ldap {
* @retval array Array of enabled flags * @retval array Array of enabled flags
**/ **/
public static function parse_flags($data) { public static function parse_flags($data) {
if (!$data)
return array();
$data = ensureIsArray($data); $data = ensureIsArray($data);
if (count($data) > 1) { if (count($data) > 1) {
LSerror :: addErrorCode('LSattr_ldap_sambaAcctFlags_01'); LSerror :: addErrorCode('LSattr_ldap_sambaAcctFlags_01');