diff --git a/supertable/variables/SuperTableVariable.php b/supertable/variables/SuperTableVariable.php index b413771..06880a1 100644 --- a/supertable/variables/SuperTableVariable.php +++ b/supertable/variables/SuperTableVariable.php @@ -43,7 +43,8 @@ public function getRelatedElements($params = null) // Get the Super Table field and associated block type $superTableField = craft()->fields->getFieldByHandle($superTableFieldHandle); - $superTableBlockType = craft()->superTable->getBlockTypesByFieldId($superTableField->id)[0]; + $superTableBlockTypes = craft()->superTable->getBlockTypesByFieldId($superTableField->id); + $superTableBlockType = $superTableBlockTypes[0]; // Loop the fields on the block type and save the first one that matches our handle $fieldId = false;