mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-10-15 16:54:28 +02:00
test: fix deprecation error (#4733)
PHP Deprecated: str_contains(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/rss-bridge/bridges/KemonoBridge.php on line 46
This commit is contained in:
@@ -42,7 +42,8 @@ class KemonoBridge extends BridgeAbstract
|
||||
|
||||
private function isCoomer()
|
||||
{
|
||||
return str_contains($this->getInput('service'), 'fans');
|
||||
$haystack = $this->getInput('service') ?? '';
|
||||
return str_contains($haystack, 'fans');
|
||||
}
|
||||
|
||||
private function baseURI()
|
||||
@@ -112,7 +113,10 @@ class KemonoBridge extends BridgeAbstract
|
||||
|
||||
public function getURI()
|
||||
{
|
||||
$uri = $this->baseURI() . $this->getInput('service') . '/user/' . $this->getInput('user');
|
||||
$service = $this->getInput('service');
|
||||
$user = $this->getInput('user');
|
||||
|
||||
$uri = $this->baseURI() . $service . '/user/' . $user;
|
||||
return $uri;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user