diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d00414..88be98e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Fixed check for rebasable URLs + ## v0.2.5 (2023-11-08) * Added URL rebasing * Enforced Stringable interface diff --git a/src/Singularity.php b/src/Singularity.php index 692b0a2..a51a11d 100644 --- a/src/Singularity.php +++ b/src/Singularity.php @@ -13,6 +13,7 @@ use DecodeLabs\Singularity\Uri; use DecodeLabs\Singularity\Url; use DecodeLabs\Singularity\Url\Generic as GenericUrl; +use DecodeLabs\Singularity\Url\Rebasable; use DecodeLabs\Singularity\Urn; use DecodeLabs\Singularity\Urn\Generic as GenericUrn; use Psr\Http\Message\UriInterface as PsrUri; @@ -85,7 +86,7 @@ public static function url( } if ( - $output !== null && + $output instanceof Rebasable && $relativeTo !== null ) { $relativeTo = self::url($relativeTo);