Skip to content

Commit cd5bd5e

Browse files
tvdijenbrousekp
andauthored
Fix warning when an attribute is empty (#16)
* fix warning when an attribute is empty * check if attribute value is an array Co-authored-by: brousekp <[email protected]>
1 parent 333493a commit cd5bd5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Auth/Process/AttributeAddFromLDAP.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function process(array &$state): void
9595
foreach ($attributes as $attr => $val) {
9696
$arrSearch[] = '%' . $attr . '%';
9797

98-
if (strlen($val[0]) > 0) {
98+
if (is_array($val) && count($val) > 0 && strlen($val[0]) > 0) {
9999
$arrReplace[] = $this->connector->escapeFilterValue($val[0], true);
100100
} else {
101101
$arrReplace[] = '';

0 commit comments

Comments
 (0)