diff --git a/changelog.json b/changelog.json index 756eb51..5fdee2c 100644 --- a/changelog.json +++ b/changelog.json @@ -1,4 +1,13 @@ [ + { + "version": "0.4.2", + "downloadUrl": "https://github.com/engram-design/SuperTable/archive/0.4.2.zip", + "date": "2016-01-13 18:15:00", + "notes": [ + "[Fixed] Fixed issue with plugin release feed url.", + "[Fixed] Fixes for PHP 5.3 compatibility." + ] + }, { "version": "0.4.1", "downloadUrl": "https://github.com/engram-design/SuperTable/archive/0.4.1.zip", diff --git a/supertable/SuperTablePlugin.php b/supertable/SuperTablePlugin.php index 4d2abfc..1d92c16 100755 --- a/supertable/SuperTablePlugin.php +++ b/supertable/SuperTablePlugin.php @@ -14,7 +14,7 @@ public function getName() public function getVersion() { - return '0.4.0'; + return '0.4.2'; } public function getSchemaVersion() @@ -44,7 +44,7 @@ public function getDocumentationUrl() public function getReleaseFeedUrl() { - return $this->getPluginUrl() . '/blob/master/changelog.json'; + return 'https://raw.githubusercontent.com/engram-design/SuperTable/master/changelog.json'; } public function onBeforeInstall() diff --git a/supertable/services/SuperTableService.php b/supertable/services/SuperTableService.php index e738d35..44bea82 100755 --- a/supertable/services/SuperTableService.php +++ b/supertable/services/SuperTableService.php @@ -848,7 +848,8 @@ public function prepForFeedMeFieldType($field, &$data, $handle) // Check to see if this is an array of items, or just a single item if (count($singleFieldData) != count($singleFieldData, 1)) { - $elementFieldData = array_values($singleFieldData)[0]; + $allSingleFieldData = array_values($singleFieldData); + $elementFieldData = $allSingleFieldData[0]; $subFieldData = craft()->feedMe_fields->prepForFieldType($elementFieldData, $subFieldHandle, $subField); } else { @@ -874,9 +875,10 @@ public function postForFeedMeFieldType(&$fieldData) // This is less intensive than craft()->fields->getFieldByHandle($fieldHandle); foreach ($fieldData as $fieldHandle => $data) { if (is_array($data)) { + $singleFieldData = array_values($data); // Check for the order attr, otherwise not what we're after - if (isset(array_values($data)[0]['order'])) { + if (isset($singleFieldData[0]['order'])) { $orderedSuperTableData = array(); $tempSuperTableData = array();