Commit f7fe0386 authored by Henning Leutz's avatar Henning Leutz 🥋

fix: fnmatch() expects parameter 2 to be a valid path, array given

parent 95eb345c
......@@ -538,9 +538,13 @@ class Brick extends QUI\QDOM
*/
public function hasCSSClass($pattern)
{
if ($this->getAttribute('classes')
&& \fnmatch($pattern, $this->getAttribute('classes'))
) {
$cssClasses = $this->getAttribute('classes');
if (\is_array($cssClasses)) {
$cssClasses = \implode(' ', $cssClasses);
}
if ($cssClasses && \fnmatch($pattern, $cssClasses)) {
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment