This commit is contained in:
Mike Macgirvin 2022-08-21 08:07:53 +10:00
parent 73946516b1
commit f8e63c5fe7
3 changed files with 7 additions and 6 deletions

View file

@ -2834,7 +2834,7 @@ class Libzot
*/
public static function get_rpost_path($observer)
{
if (!$observer) {
if (empty($observer)) {
return EMPTY_STR;
}

View file

@ -78,7 +78,7 @@ class Rpost extends Controller
$def_album = get_pconfig($channel['channel_id'], 'system', 'photo_path');
$def_attach = get_pconfig($channel['channel_id'], 'system', 'attach_path');
$r = attach_store($channel, (($observer) ? $observer['xchan_hash'] : ''), '', [
$r = attach_store($channel, (!empty(($observer)) ? $observer['xchan_hash'] : ''), '', [
'source' => 'editor',
'visible' => 0,
'album' => $def_album,
@ -106,7 +106,6 @@ class Rpost extends Controller
break;
}
sleep(1);
continue;
}
if ($thumb) {
@ -205,7 +204,7 @@ class Rpost extends Controller
);
if ($xchan) {
$_REQUEST['body'] .= '@!{' . (($xchan[0]['xchan_addr']) ? $xchan[0]['xchan_addr'] : $xchan[0]['xchan_url']) . '} ' ;
$_REQUEST['body'] .= '@!{' . (($xchan[0]['xchan_addr']) ?: $xchan[0]['xchan_url']) . '} ' ;
}
}
}

View file

@ -1072,7 +1072,8 @@ class App {
self::$channel = $channel;
}
public static function get_channel() {
public static function get_channel(): mixed
{
return self::$channel;
}
@ -1081,7 +1082,8 @@ class App {
}
public static function get_observer() {
public static function get_observer(): mixed
{
return self::$observer;
}