mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-30 21:30:14 +02:00
fix: a few deprecation notices on php 8.2 (#3917)
* fix: a few deprecation notices on php 8.2 * tweak
This commit is contained in:
@@ -35,10 +35,23 @@ class AllegroBridge extends BridgeAbstract
|
||||
|
||||
public function getName()
|
||||
{
|
||||
parse_str(parse_url($this->getInput('url'), PHP_URL_QUERY), $fields);
|
||||
$url = $this->getInput('url');
|
||||
if (!$url) {
|
||||
return parent::getName();
|
||||
}
|
||||
$parsedUrl = parse_url($url, PHP_URL_QUERY);
|
||||
if (!$parsedUrl) {
|
||||
return parent::getName();
|
||||
}
|
||||
parse_str($parsedUrl, $fields);
|
||||
|
||||
if ($query = array_key_exists('string', $fields) ? urldecode($fields['string']) : false) {
|
||||
return $query;
|
||||
if (array_key_exists('string', $fields)) {
|
||||
$f = urldecode($fields['string']);
|
||||
} else {
|
||||
$f = false;
|
||||
}
|
||||
if ($f) {
|
||||
return $f;
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
|
Reference in New Issue
Block a user