Skip to content

Commit

Permalink
Fix PHP 8 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kevindees committed Dec 22, 2022
1 parent f1c6169 commit 97b7afa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Elements/Traits/CloneFields.php
Expand Up @@ -29,7 +29,7 @@ public function cloneElementsToForm($form = null) {
if($this->fields && $form instanceof BaseForm) {
/** @var Field|CloneFields $field */
foreach ($this->fields as $i => $field) {
if(method_exists($field, 'cloneToForm')) {
if(!is_null($field) && method_exists($field, 'cloneToForm')) {
$this->fields[$i] = $field->cloneToForm(clone $form);
}
}
Expand Down

0 comments on commit 97b7afa

Please sign in to comment.