Skip to content

Commit

Permalink
fix: Handle the Pocket links without URL
Browse files Browse the repository at this point in the history
  • Loading branch information
marienfressinaud committed Oct 18, 2024
1 parent f18357c commit f14335a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jobs/PocketImportator.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function importPocketItems(models\User $user, array $items, array $option

foreach ($items as $item) {
/** @var string */
$given_url = $item['given_url'];
$given_url = $item['given_url'] ?? '';
$given_url = \SpiderBits\Url::sanitize($given_url);

if (!\SpiderBits\Url::isValid($given_url)) {
Expand Down Expand Up @@ -190,7 +190,7 @@ public function importPocketItems(models\User $user, array $items, array $option
}

/** @var string */
$resolved_url = $item['resolved_url'];
$resolved_url = $item['resolved_url'] ?? '';
$resolved_url = \SpiderBits\Url::sanitize($resolved_url);

if (isset($link_ids_by_urls[$given_url])) {
Expand Down

0 comments on commit f14335a

Please sign in to comment.