From d6033e028871d887f49497707274f5bd55a74f4e Mon Sep 17 00:00:00 2001 From: Josh Crawford Date: Wed, 13 Jan 2016 18:33:18 +1100 Subject: [PATCH] more php 5.3 fixes --- supertable/variables/SuperTableVariable.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;