Skip to content

Commit ea278f6

Browse files
committed
fix
1 parent c504a0a commit ea278f6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Url.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,9 @@ private function setPath($path)
521521

522522
$file = substr(strrchr($path, '/'), 1);
523523

524-
if ($file !== '') {
524+
if (strlen($file)) {
525525
$path = substr($path, 0, -strlen($file));
526-
}
527526

528-
if ($file) {
529527
if (preg_match('/(.*)\.([\w]+)$/', $file, $match)) {
530528
$this->info['file'] = $match[1];
531529
$this->info['extension'] = $match[2];

0 commit comments

Comments
 (0)