mirror of
https://github.com/friendica/friendica
synced 2025-04-27 17:10:10 +00:00
Add return type never, fix more errors
This commit is contained in:
parent
12ed714a9e
commit
24f75cd618
5 changed files with 26 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue