mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 15:55:13 +00:00
php errors from logs
This commit is contained in:
parent
02f51ec7ff
commit
165d50e932
2 changed files with 15 additions and 3 deletions
|
@ -167,6 +167,15 @@ class ActivityStreams
|
|||
if ((!$this->parent_id) && is_array($this->obj)) {
|
||||
$this->parent_id = $this->obj['id'];
|
||||
}
|
||||
if (is_array($this->parent_id)) {
|
||||
if (array_key_exists(0, $this->parent_id)) {
|
||||
$this->parent_id = $this->parent_id[0];
|
||||
}
|
||||
else {
|
||||
btlogger('parent_id is array: ' . print_r($this->parent_id, true));
|
||||
$this->parent_id = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -356,8 +356,11 @@ class Display extends Controller
|
|||
|
||||
// see if the top-level post owner chose to block search engines
|
||||
|
||||
if ($items && get_pconfig($items[0]['uid'], 'system', 'noindex')) {
|
||||
App::$meta->set('robots', 'noindex, noarchive');
|
||||
if ($items) {
|
||||
$signingChannel = Channel::from_id($items[0]['uid']);
|
||||
if(get_pconfig($items[0]['uid'], 'system', 'noindex')) {
|
||||
App::$meta->set('robots', 'noindex, noarchive');
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($items as $item) {
|
||||
|
@ -421,7 +424,7 @@ class Display extends Controller
|
|||
if (!$json) {
|
||||
$json = Activity::encode_activity($item, true);
|
||||
$json = array_merge(Activity::ap_context(''), $json);
|
||||
$json['proof'] = (new JcsEddsa2022)->sign($json, $channel);
|
||||
$json['proof'] = (new JcsEddsa2022)->sign($json, $signingChannel);
|
||||
}
|
||||
App::$meta->setjson($json);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue