diff --git a/libraries/joomla/form/rule/options.php b/libraries/joomla/form/rule/options.php index 7b98ffb5bef67..5418002ec2916 100644 --- a/libraries/joomla/form/rule/options.php +++ b/libraries/joomla/form/rule/options.php @@ -53,7 +53,9 @@ public function test(SimpleXMLElement $element, $value, $group = null, Registry } else { - return in_array($value, $options); + // In this case value must be a string + + return in_array((string) $value, $options); } } }