Skip to content

Commit a2dd797

Browse files
author
Jehannes Stellingwerf
committed
Fixed #441: force type to string when overriding adapter url, to comply with the definition of getUrl()-method. When $url is not set, magic getter resolves getUrl() and therefor consumers will be expecting a string, not an object (even if it implements __toString()).
1 parent fe22611 commit a2dd797

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Providers/OEmbed/Youtube.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static function create(Adapter $adapter)
2121
// The Adapter URL should be forced to starting URL as well
2222
// to prevent consumers of the packages having to deal
2323
// with a URL to a consent page (#441)
24-
$adapter->url = $response->getStartingUrl();
24+
$adapter->url = (string) $response->getStartingUrl();
2525
return new static($response, $response->getStartingUrl());
2626
}
2727

0 commit comments

Comments
 (0)