Selaa lähdekoodia

! Undefined index under certain error circumstances.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 10 vuotta sitten
vanhempi
commit
51b32e87b2
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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'],
 			);