Skip to content

Commit 7453a0d

Browse files
committed
fixed helper method
1 parent adfeb98 commit 7453a0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Kodeine/Acl/Helper/Helper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ protected function parseOperator($str)
6161
protected function hasDelimiterToArray($str)
6262
{
6363
if ( is_string($str) && preg_match('/[,|]/is', $str) ) {
64-
$str = preg_split('/ ?[,|] ?/', $str);
65-
$str = array_filter($str, 'strtolower');
64+
return preg_split('/ ?[,|] ?/', strtolower($str));
6665
}
6766

68-
return strtolower($str);
67+
return is_array($str) ?
68+
array_filter($str, 'strtolower') : strtolower($str);
6969
}
7070

7171
/**

0 commit comments

Comments
 (0)