enigmadigital/Formerly

1.3.2 Error

nevsie opened this issue · 2 comments

Lines 367 to 377 on file Formerly_FormsService.php
$folderid and $allowedkinds are set incorrectly, using square brackets.

need updating to:

                if (craft()->config->exists(Formerly_ConfigSettings::SettingsGroupName))
                {
                    if (array_key_exists(Formerly_ConfigSettings::UploadAssetFolderId, craft()->config->get(Formerly_ConfigSettings::SettingsGroupName)))
                    {
                        $folderId = craft()->config->get(Formerly_ConfigSettings::SettingsGroupName, Formerly_ConfigSettings::UploadAssetFolderId);
                    }
                    if (array_key_exists(Formerly_ConfigSettings::AllowedKinds, craft()->config->get(Formerly_ConfigSettings::SettingsGroupName)))
                    {
                        $allowedKinds = craft()->config->get(Formerly_ConfigSettings::SettingsGroupName, Formerly_ConfigSettings::AllowedKinds);
                    }
                }

likewise on line 68 of Formerly_SubmissionsService.php

Ah yes I found that bug yesterday, It seems to be an issue with older
versions of php.

I was going to investigate today but you've done it for me, thanks!

On Mon, Aug 10, 2015 at 10:32 PM, nevsie notifications@github.com wrote:

Lines 367 to 377 on file Formerly_FormsService.php
$folderid and $allowedkinds are set incorrectly, using square brackets.

need updating to:
'''php
if (craft()->config->exists(Formerly_ConfigSettings::SettingsGroupName))
{
if (array_key_exists(Formerly_ConfigSettings::UploadAssetFolderId,
craft()->config->get(Formerly_ConfigSettings::SettingsGroupName)))
{
$folderId =
craft()->config->get(Formerly_ConfigSettings::SettingsGroupName,
Formerly_ConfigSettings::UploadAssetFolderId);
}
if (array_key_exists(Formerly_ConfigSettings::AllowedKinds,
craft()->config->get(Formerly_ConfigSettings::SettingsGroupName)))
{
$allowedKinds =
craft()->config->get(Formerly_ConfigSettings::SettingsGroupName,
Formerly_ConfigSettings::AllowedKinds);
}
}
'''


Reply to this email directly or view it on GitHub
#32.