Merge pull request #14095 from annando/warning

Fix warning: Undefined array key "post-reason"
This commit is contained in:
Hypolite Petovan 2024-04-15 00:09:01 -04:00 committed by GitHub
commit c30e4c02de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 2 deletions

View File

@ -279,6 +279,7 @@ function item_process(array $post, array $request, bool $preview, string $return
$post['body'] = BBCode::removeSharedData(Item::setHashtags($post['body']));
$post['writable'] = true;
$post['sensitive'] = false;
$post['post-reason'] = Item::PR_LOCAL;
$o = DI::conversation()->render([$post], Conversation::MODE_SEARCH, false, true);

View File

@ -83,6 +83,10 @@ class Statuses extends BaseApi
$item['network'] = $post['network'];
$item['gravity'] = $post['gravity'];
$item['verb'] = $post['verb'];
$item['allow_cid'] = $post['allow_cid'];
$item['allow_gid'] = $post['allow_gid'];
$item['deny_cid'] = $post['deny_cid'];
$item['deny_gid'] = $post['deny_gid'];
$item['app'] = $this->getApp();
$item['sensitive'] = $request['sensitive'];

View File

@ -2000,8 +2000,8 @@ class Probe
if (isset($adr)) {
foreach ($adr as $feadr) {
if ((strcasecmp($feadr->mailbox, $data['name']) == 0)
&&(strcasecmp($feadr->host, $phost) == 0)
&& (strlen($feadr->personal))
&& (strcasecmp($feadr->host, $phost) == 0)
&& !empty($feadr->personal)
) {
$personal = imap_mime_header_decode($feadr->personal);
$data['name'] = '';