Spamnoticer - manual ban: check if files field is set
This commit is contained in:
parent
9d48a5bbe1
commit
e25908d87e
|
@ -1756,6 +1756,8 @@ function mod_merge($originBoard, $postID) {
|
|||
function parse_spamnoticer_content_fields($postData, $post): BanFormFieldsForSpamnoticer {
|
||||
$files_info = array();
|
||||
|
||||
|
||||
if (isset($post->files) && is_array($post->files)) {
|
||||
foreach ($post->files as $file) {
|
||||
$filename = $file->file;
|
||||
$filekey = str_replace('.', '_', $filename); // because $_POST actually does the inverse of this when no one is asking it to. php is a fucking idiotic language
|
||||
|
@ -1769,6 +1771,7 @@ function parse_spamnoticer_content_fields($postData, $post): BanFormFieldsForSp
|
|||
$fileInfo = new SpamNoticerBanFileInfo($filename, $is_illegal, $is_spam);
|
||||
array_push($files_info, $fileInfo);
|
||||
}
|
||||
}
|
||||
|
||||
$ban = isset($postData['checkbox-ban']);
|
||||
$delete = isset($postData['checkbox-delete']);
|
||||
|
|
Loading…
Reference in New Issue