[PixivBridge] [UnsplashBridge] Fix deprecated null (#2705)

This commit is contained in:
Yaman Qalieh 2022-05-08 10:17:26 -04:00 committed by GitHub
parent f5a51038cc
commit 0ce71d561d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ class PixivBridge extends BridgeAbstract {
switch($this->queriedContext) { switch($this->queriedContext) {
// Tags context // Tags context
case '': case '':
$uri = static::URI . 'tags/' . urlencode($this->getInput('tag')); $uri = static::URI . 'tags/' . urlencode($this->getInput('tag') ?? '');
break; break;
case 'User': case 'User':
$uri = static::URI . 'users/' . $this->getInput('userid'); $uri = static::URI . 'users/' . $this->getInput('userid');

View File

@ -103,7 +103,7 @@ class UnsplashBridge extends BridgeAbstract
public function getName() public function getName()
{ {
$filteredUser = $this->getInput('u'); $filteredUser = $this->getInput('u') ?? '';
if (strlen($filteredUser) > 0) { if (strlen($filteredUser) > 0) {
return $filteredUser . ' - ' . self::NAME; return $filteredUser . ' - ' . self::NAME;
} else { } else {