Skip to content

Commit 03458d7

Browse files
committed
fixed wrong parsing or oembed tumblr url
1 parent 690f999 commit 03458d7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Url.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,10 @@ public function getPath()
254254
{
255255
$path = !empty($this->info['path']) ? '/'.implode('/', $this->info['path']).'/' : '/';
256256

257-
if (!empty($this->info['file'])) {
257+
if (isset($this->info['file'])) {
258258
$path .= $this->info['file'];
259259

260-
if (!empty($this->info['extension'])) {
260+
if (isset($this->info['extension'])) {
261261
$path .= '.'.$this->info['extension'];
262262
}
263263
}

tests/UrlTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public function testParser()
88
'http://vimeo.com//69912181?' => 'http://vimeo.com/69912181',
99
'http://vimeo.com//69912181' => 'http://vimeo.com/69912181',
1010
'http://vimeo.com/69912181' => 'http://vimeo.com/69912181',
11+
'https://www.tumblr.com/oembed/1.0' => 'https://www.tumblr.com/oembed/1.0',
1112
];
1213

1314
foreach ($urls as $url => $expected_url) {

0 commit comments

Comments
 (0)