I'm aware the plugin has only been tested on 5.5, and developing locally with 5.4 works a treat. Our development server runs 5.3.29, and runs across an error in fieldtypes/ButtonBox_TextSizeFieldType.php and fieldtypes/ButtonBox_ColoursFieldType.php
Basically, It just doesn't like the direct calling method when referencing an array index (why this was never supported a long time ago is beyond me).
Up to you if you wish to add official support for this, and in case anyone else needs a fix for this issue:
protected function getDefaultValue()
{
foreach ($this->getOptions() as $option)
{
if ( !empty($option['default']) )
{
return $option['value'];
}
}
return $this->getOptions()[0]['value'];
}
protected function getDefaultValue()
{
$options = $this->getOptions();
foreach ($options as $option)
{
if ( !empty($option['default']) )
{
return $option['value'];
}
}
return $options[0]['value'];
}
I'm aware the plugin has only been tested on 5.5, and developing locally with 5.4 works a treat. Our development server runs 5.3.29, and runs across an error in
fieldtypes/ButtonBox_TextSizeFieldType.phpandfieldtypes/ButtonBox_ColoursFieldType.phpBasically, It just doesn't like the direct calling method when referencing an array index (why this was never supported a long time ago is beyond me).
Up to you if you wish to add official support for this, and in case anyone else needs a fix for this issue: