News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Syntax error with attachments

Started by Mudlark, June 06, 2009, 02:07:20 PM

Previous topic - Next topic

Mudlark

Hi, just opened a new 2-RC-1-1 and have found a problem with uploading attachments.

The problem lies in the Subs-Graphic.php file at, or around line 219:


File reads:
if ($success)
{
// Walk the right path. if (!empty($modSettings['currentAttachmentUploadDir']))
{
if (!is_array($modSettings['attachmentUploadDir']))
$modSettings['attachmentUploadDir'] = unserialize($modSettings['attachmentUploadDir']);
$path = $modSettings['attachmentUploadDir'][$dir];
}


It should read:
if ($success)
{
// Walk the right path.
if (!empty($modSettings['currentAttachmentUploadDir']))
{
if (!is_array($modSettings['attachmentUploadDir']))
$modSettings['attachmentUploadDir'] = unserialize($modSettings['attachmentUploadDir']);
$path = $modSettings['attachmentUploadDir'][$dir];
}


Hope this saves a hair tearing session ;)

Advertisement: