Skip to content

Commit

Permalink
Merge pull request #369 from becoded/avoid-deprecation-warning-php-8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
neilime authored Jul 6, 2022
2 parents ce8418c + e227d92 commit 2aba614
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/TwbsHelper/View/HtmlAttributesSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function __construct(
$this->cleanAttributes();
}

#[\ReturnTypeWillChange]
public function offsetGet($key)
{
if (!$this->offsetExists($key) && isset(static::$attributeWithSet[$key])) {
Expand Down
2 changes: 1 addition & 1 deletion src/TwbsHelper/View/HtmlClassAttributeSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function cleanAttribute(): self
{
$classes = $this->getArrayCopy();

$classes = array_unique(array_filter(array_map('trim', $classes)));
$classes = array_unique(array_filter(array_map('trim', array_filter($classes))));
sort($classes);

$this->exchangeArray($classes);
Expand Down

0 comments on commit 2aba614

Please sign in to comment.