Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fix-php82-deprecation-improvemen…
Browse files Browse the repository at this point in the history
…t' into fix-php82-deprecation-improvement
  • Loading branch information
shvlv committed Nov 28, 2024
2 parents d9276a5 + e04a108 commit 1180455
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/OutputFilter/AttributesOutputFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __invoke(string $html, Asset $asset): string
protected function applyAttributes(\WP_HTML_Tag_Processor $script, array $attributes): void

Check warning on line 41 in src/OutputFilter/AttributesOutputFilter.php

View check run for this annotation

Codecov / codecov/patch

src/OutputFilter/AttributesOutputFilter.php#L41

Added line #L41 was not covered by tests
{
foreach ($attributes as $key => $value) {
$key = esc_attr((string)$key);
$key = esc_attr((string) $key);
if ((string) $script->get_attribute($key)) {

Check warning on line 45 in src/OutputFilter/AttributesOutputFilter.php

View check run for this annotation

Codecov / codecov/patch

src/OutputFilter/AttributesOutputFilter.php#L45

Added line #L45 was not covered by tests
continue;
}
Expand All @@ -50,7 +50,7 @@ protected function applyAttributes(\WP_HTML_Tag_Processor $script, array $attrib
}
$value = is_bool($value)
? esc_attr($key)
: esc_attr((string)$value);
: esc_attr((string) $value);

$script->set_attribute($key, $value);

Check warning on line 55 in src/OutputFilter/AttributesOutputFilter.php

View check run for this annotation

Codecov / codecov/patch

src/OutputFilter/AttributesOutputFilter.php#L55

Added line #L55 was not covered by tests
}
Expand Down

0 comments on commit 1180455

Please sign in to comment.