Skip to content

Commit

Permalink
Merge pull request #54 from alleyinteractive/hotfix/fix-version-for-n…
Browse files Browse the repository at this point in the history
…ew-svg

As it turns out, the new SVG attributes happened in PHP 8.1
  • Loading branch information
anubisthejackle authored Sep 8, 2023
2 parents 54d1878 + 96d14db commit 9762209
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test-sprite.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ function test_asset_with_nested_dom() {
* In PHP 8.2 the def and g tags have xmlns:xlink attributes, while in PHP 8.0 they do not. This address that issue.
* Further, in PHP 8.0 the symbol tag has the xmlns:xlink attribute, while in PHP 8.2 that has been removed.
*/
$def_g_attribute = ( version_compare(phpversion(), '8.2.0', '<') ? '' : ' xmlns:xlink="http://www.w3.org/1999/xlink"' );
$symbol_attribute = ( version_compare(phpversion(), '8.2.0', '>') ? '' : ' xmlns:xlink="http://www.w3.org/1999/xlink"' );
$def_g_attribute = ( version_compare(phpversion(), '8.1.0', '<') ? '' : ' xmlns:xlink="http://www.w3.org/1999/xlink"' );
$symbol_attribute = ( version_compare(phpversion(), '8.1.0', '>') ? '' : ' xmlns:xlink="http://www.w3.org/1999/xlink"' );
$nested_dom = sprintf( $this->nested_dom, $def_g_attribute, $symbol_attribute );
$with_embedded_script_expected = sprintf( $this->empty_sprite_wrapper, $nested_dom );

Expand Down

0 comments on commit 9762209

Please sign in to comment.