Skip to content

Commit

Permalink
Fix phan
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed Apr 15, 2021
1 parent 0bc956e commit 51e5b26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public function removeBaseUrlFromAbsoluteLinks() {
->where($sql->expr()->eq('notification_id', $sql->createNamedParameter($row['notification_id'])));

$linkUrlComponents = \parse_url($row['link']);
if (isset($linkUrlComponents['scheme'])) {
if (isset($linkUrlComponents['scheme']) && isset($linkUrlComponents['path'])) {
$sql->set('link', $sql->createNamedParameter($linkUrlComponents['path']));
}

Expand All @@ -343,7 +343,7 @@ public function removeBaseUrlFromAbsoluteLinks() {

foreach ($actions as $index => $action) {
$actionUrlComponents = \parse_url($action['link']);
if (isset($actionUrlComponents['scheme'])) {
if (isset($actionUrlComponents['scheme']) && isset($actionUrlComponents['path'])) {
$actions[$index]['link'] = $actionUrlComponents['path'];
}
}
Expand Down

0 comments on commit 51e5b26

Please sign in to comment.