Explorar el Código

! Undefined index under certain error circumstances.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer hace 10 años
padre
commit
51b32e87b2
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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'],
 			);