File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class OEmbed extends Base
1212 const ENDPOINT_POST = 'https://graph.facebook.com/v25.0/oembed_post ' ;
1313 const ENDPOINT_VIDEO = 'https://graph.facebook.com/v25.0/oembed_video ' ;
1414
15- protected function detectEndpoint (): ? UriInterface
15+ protected function detectEndpoint (): UriInterface
1616 {
1717 $ token = $ this ->extractor ->getSetting ('facebook:token ' );
1818
@@ -24,7 +24,7 @@ protected function detectEndpoint(): ?UriInterface
2424 }
2525 }
2626 $ queryParameters = $ this ->getOembedQueryParameters ((string ) $ uri );
27- if ($ token ) $ queryParameters ['access_token ' ] = $ token ;
27+ if (! empty ( $ token) ) $ queryParameters ['access_token ' ] = $ token ;
2828
2929 return $ this ->extractor ->getCrawler ()
3030 ->createUri ($ this ->getEndpointByPath ($ uri ->getPath ()))
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class OEmbed extends Base
1010{
1111 const ENDPOINT = 'https://graph.facebook.com/v25.0/instagram_oembed ' ;
1212
13- protected function detectEndpoint (): ? UriInterface
13+ protected function detectEndpoint (): UriInterface
1414 {
1515 $ token = $ this ->extractor ->getSetting ('instagram:token ' );
1616
@@ -20,7 +20,7 @@ protected function detectEndpoint(): ?UriInterface
2020 }
2121
2222 $ queryParameters = $ this ->getOembedQueryParameters ((string ) $ uri );
23- if ($ token ) $ queryParameters ['access_token ' ] = $ token ;
23+ if (! empty ( $ token) ) $ queryParameters ['access_token ' ] = $ token ;
2424
2525 return $ this ->extractor ->getCrawler ()
2626 ->createUri (self ::ENDPOINT )
You can’t perform that action at this time.
0 commit comments