[Bug] Unexpected T_ELSE error in 2.0 RC1-1

Started by Skhilled, July 16, 2009, 08:41:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Skhilled

This is a known issue in the 2.0 RC1-1 Large upgrade, small update, full download, and changed files download from the news topic.  If you have upgraded via the package manager, this bug should not affect you. This usually happens on registration or no visual verification.

In ./Sources/Subs-Graphics.php

Find:

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


Replace with:

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


You can follow the topic here:

http://www.simplemachines.org/community/index.php?topic=312955.0