Skip to content

Commit

Permalink
fix(OLX): deprecation notice
Browse files Browse the repository at this point in the history
  • Loading branch information
dvikan committed Jan 23, 2024
1 parent 4973aaa commit 146e643
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bridges/OLXBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ public function getURI()

public function getName()
{
$paths = explode('/', parse_url($this->getInput('url'), PHP_URL_PATH));
$url = $this->getInput('url');
if (!$url) {
return parent::getName();
}

$parsedUrl = Url::fromString($url);
$paths = explode('/', $parsedUrl->getPath());

$query = array_reduce($paths, function ($q, $p) {
if (preg_match('/^q-(.+)$/i', $p, $matches)) {
Expand Down

0 comments on commit 146e643

Please sign in to comment.