fix nullsafe warning

This commit is contained in:
Jean-Christian Denis 2023-05-01 01:10:24 +02:00
parent a036d037ac
commit 4afb4d73c2
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
2 changed files with 4 additions and 2 deletions

View file

@ -37,6 +37,8 @@ class My
*/
public static function name(): string
{
return __((string) dcCore::app()->plugins->moduleInfo(self::id(), 'name'));
$name = dcCore::app()->plugins->moduleInfo(self::id(), 'name');
return __(is_string($name) ? $name : self::id());
}
}

View file

@ -64,7 +64,7 @@ class Prepend extends dcNsProcess
}
// Use visible redirection
if ($redir) {
if ($redir && !is_null(dcCore::app()->blog)) {
Http::redirect(dcCore::app()->blog->url . $part);
}