Parcourir la source

! Undefined index under certain error circumstances.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer il y a 10 ans
Parent
commit
51b32e87b2
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      Sources/Post.php

+ 1 - 1
Sources/Post.php

@@ -1695,7 +1695,7 @@ function Post2()
 				'tmp_name' => $attachment['tmp_name'],
 				'size' => isset($attachment['size']) ? $attachment['size'] : 0,
 				'mime_type' => isset($attachment['type']) ? $attachment['type'] : '',
-				'id_folder' => $attachment['id_folder'],
+				'id_folder' => isset($attachment['id_folder']) ? $attachment['id_folder'] : $modSettings['currentAttachmentUploadDir'],
 				'approved' => !$modSettings['postmod_active'] || allowedTo('post_attachment'),
 				'errors' => $attachment['errors'],
 			);