Add return type never, fix more errors

This commit is contained in:
Art4 2024-11-17 22:55:42 +00:00
parent 12ed714a9e
commit 24f75cd618
5 changed files with 26 additions and 5 deletions

View file

@ -124,7 +124,11 @@ class Photos extends \Friendica\Module\BaseProfile
$visible = 0;
}
$ret = ['src' => '', 'filename' => '', 'filesize' => 0, 'type' => ''];
$ret = ['src' => '', 'filename' => '', 'filesize' => 0, 'type' => ''];
$src = null;
$filename = '';
$filesize = 0;
$type = '';
Hook::callAll('photo_post_file', $ret);
@ -164,7 +168,11 @@ class Photos extends \Friendica\Module\BaseProfile
$this->systemMessages->addNotice($this->t('Server can\'t accept new file upload at this time, please contact your administrator'));
break;
}
@unlink($src);
if ($src !== null) {
@unlink($src);
}
$foo = 0;
Hook::callAll('photo_post_end', $foo);
return;