Spamnoticer - addToSpamNoticer, guard against null files field
This commit is contained in:
parent
e25908d87e
commit
18f63222f8
|
@ -150,6 +150,7 @@ function addToSpamNoticer($config, $post, $boardname, BanFormFieldsForSpamnotice
|
|||
|
||||
$attachments = array();
|
||||
|
||||
if (isset($post->files) && is_array($post->files)) {
|
||||
foreach ($post->files as $file) {
|
||||
$key = $file->file_id . '.' . $file->extension;
|
||||
$file_info = $form_info->files_info[$key];
|
||||
|
@ -174,6 +175,7 @@ function addToSpamNoticer($config, $post, $boardname, BanFormFieldsForSpamnotice
|
|||
|
||||
$attachments[] = $a;
|
||||
}
|
||||
}
|
||||
|
||||
$json_payload = [
|
||||
'attachments' => $attachments,
|
||||
|
|
Loading…
Reference in New Issue