Skip to content

Commit

Permalink
Merge pull request #251 from ikke-zelf/patch-2
Browse files Browse the repository at this point in the history
Type Countable Array in php 8.1 not valid coded
  • Loading branch information
wmetge authored Dec 16, 2022
2 parents 0303230 + e13596d commit ddad50f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ public function __construct($tags = array())
*/
public function setTags($tags = array())
{
if (!count($tags) || empty($tags))
if (!count((array)$tags) || empty($tags))
$this->tags = [];

$this->tags = array_map(function ($tag) {
return [
'key' => 'customer',
'value' => $tag,
];
}, $tags);
}, (array)$tags);
}

/**
Expand All @@ -49,4 +49,4 @@ public function getTags()
{
return $this->tags;
}
}
}

0 comments on commit ddad50f

Please sign in to comment.