Skip to content

Commit

Permalink
Update Seo.php
Browse files Browse the repository at this point in the history
  • Loading branch information
madeITBelgium authored Jul 5, 2022
1 parent 0812246 commit a2cf8c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -748,10 +748,10 @@ public function abs_url($url, $base)
if (!empty($url_parts['path'])) {
// Is the path relative
if (substr($url_parts['path'], 0, 1) !== '/') {
if (substr($base_parts['path'], -1) === '/') {
if (isset($base_parts['path']) && substr($base_parts['path'], -1) === '/') {
$url_parts['path'] = $base_parts['path'].$url_parts['path'];
} else {
$url_parts['path'] = dirname($base_parts['path']).'/'.$url_parts['path'];
$url_parts['path'] = dirname($base_parts['path'] ?? null).'/'.$url_parts['path'];
}
}

Expand Down

0 comments on commit a2cf8c0

Please sign in to comment.