Skip to content

Commit 00db89c

Browse files
author
Thomas Hunziker
committed
$field->assigned_cat_ids may not exist.
1 parent 0ea8dad commit 00db89c

File tree

1 file changed

+1
-1
lines changed
  • administrator/components/com_fields/helpers

1 file changed

+1
-1
lines changed

administrator/components/com_fields/helpers/fields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ public static function prepareForm($context, JForm $form, $data)
450450
* If the field belongs to an assigned_cat_id but the assigned_cat_ids in the data
451451
* is not known, set the required flag to false on any circumstance.
452452
*/
453-
if (! $assignedCatids && $field->assigned_cat_ids && $form->getField($field->alias))
453+
if (!$assignedCatids && !empty($field->assigned_cat_ids) && $form->getField($field->alias))
454454
{
455455
$form->setFieldAttribute($field->alias, 'required', 'false');
456456
}

0 commit comments

Comments
 (0)