From 00db89cef9c7d67a2be80198fc4993dec01d7bbb Mon Sep 17 00:00:00 2001 From: Thomas Hunziker Date: Thu, 12 Jan 2017 09:45:27 +0100 Subject: [PATCH] $field->assigned_cat_ids may not exist. --- administrator/components/com_fields/helpers/fields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/components/com_fields/helpers/fields.php b/administrator/components/com_fields/helpers/fields.php index c2b09f1013b7a..b5147e876010d 100644 --- a/administrator/components/com_fields/helpers/fields.php +++ b/administrator/components/com_fields/helpers/fields.php @@ -450,7 +450,7 @@ public static function prepareForm($context, JForm $form, $data) * If the field belongs to an assigned_cat_id but the assigned_cat_ids in the data * is not known, set the required flag to false on any circumstance. */ - if (! $assignedCatids && $field->assigned_cat_ids && $form->getField($field->alias)) + if (!$assignedCatids && !empty($field->assigned_cat_ids) && $form->getField($field->alias)) { $form->setFieldAttribute($field->alias, 'required', 'false'); }