diff --git a/administrator/components/com_menus/models/fields/modal/menu.php b/administrator/components/com_menus/models/fields/modal/menu.php index bd0da938795cc..0be6d92d3ed83 100644 --- a/administrator/components/com_menus/models/fields/modal/menu.php +++ b/administrator/components/com_menus/models/fields/modal/menu.php @@ -98,6 +98,7 @@ public function __set($name, $value) case 'allowClear': case 'allowNew': case 'allowEdit': + $value = (string) $value; $this->$name = !($value === 'false' || $value === 'off' || $value === '0'); break; diff --git a/libraries/legacy/form/field/componentlayout.php b/libraries/legacy/form/field/componentlayout.php index cc68baa1f882b..70ac4a0b63c89 100644 --- a/libraries/legacy/form/field/componentlayout.php +++ b/libraries/legacy/form/field/componentlayout.php @@ -115,7 +115,7 @@ protected function getInput() $groups = array(); // Add a Use Global option if useglobal="true" in XML file - if ($this->element['useglobal'] === 'true') + if ((string) $this->element['useglobal'] === 'true') { $groups[JText::_('JOPTION_FROM_STANDARD')]['items'][] = JHtml::_('select.option', '', JText::_('JGLOBAL_USE_GLOBAL')); } diff --git a/libraries/src/Form/Field/HelpsiteField.php b/libraries/src/Form/Field/HelpsiteField.php index 4f277e9862393..3ab75ee2d7a0c 100644 --- a/libraries/src/Form/Field/HelpsiteField.php +++ b/libraries/src/Form/Field/HelpsiteField.php @@ -57,7 +57,7 @@ protected function getInput() { \JHtml::_('script', 'system/helpsite.js', array('version' => 'auto', 'relative' => true)); - $showDefault = $this->getAttribute('showDefault') === 'false' ? 'false' : 'true'; + $showDefault = (string) $this->getAttribute('showDefault') === 'false' ? 'false' : 'true'; $html = parent::getInput(); $button = '