Merge pull request #14167 from annando/warning

Fix: Undefined array key "content-warning"
pull/14168/head
Hypolite Petovan 2024-05-18 07:45:48 -04:00 committed by GitHub
commit a5e12c82df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 7 deletions

View File

@ -234,13 +234,15 @@ function item_insert(int $uid, array $request, bool $preview, string $return_pat
function item_process(array $post, array $request, bool $preview, string $return_path): array function item_process(array $post, array $request, bool $preview, string $return_path): array
{ {
$post['self'] = true; $post['self'] = true;
$post['api_source'] = false; $post['api_source'] = false;
$post['attach'] = ''; $post['attach'] = '';
$post['title'] = trim($request['title'] ?? ''); $post['title'] = trim($request['title'] ?? '');
$post['body'] = $request['body'] ?? ''; $post['content-warning'] = trim($request['summary'] ?? '');
$post['location'] = trim($request['location'] ?? ''); $post['sensitive'] = !empty($request['sensitive'] ?? false);
$post['coord'] = trim($request['coord'] ?? ''); $post['body'] = $request['body'] ?? '';
$post['location'] = trim($request['location'] ?? '');
$post['coord'] = trim($request['coord'] ?? '');
$post = DI::contentItem()->addCategories($post, $request['category'] ?? ''); $post = DI::contentItem()->addCategories($post, $request['category'] ?? '');