Skip to content

Commit

Permalink
Set this->_field at the top again
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Sep 20, 2024
1 parent 84bea0e commit cbccf95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fieldlayoutelements/CustomField.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class CustomField extends BaseField
*/
public function __construct(?FieldInterface $field = null, $config = [])
{
$this->_field = $field;

// ensure we set the field last, so it has access to other properties that need to be set first
// see https://github.com/craftcms/cms/issues/15752
$fieldUid = ArrayHelper::remove($config, 'fieldUid');
Expand All @@ -43,7 +45,6 @@ public function __construct(?FieldInterface $field = null, $config = [])
}

parent::__construct($config);
$this->_field = $field;
}

/**
Expand Down

0 comments on commit cbccf95

Please sign in to comment.