1
0
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:
Dag
2024-01-23 23:02:06 +01:00
committed by GitHub
parent 4986119f1f
commit 487c692e68
4 changed files with 28 additions and 7 deletions

View File

@@ -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();