From 3195d4785e505f664898b6d5599c844832fa9734 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Wed, 16 Dec 2020 21:05:39 +0100 Subject: Fixes field reference in foreach loop --- src/Metabox.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Metabox.php') diff --git a/src/Metabox.php b/src/Metabox.php index 0f4c5d7..b2ae2e4 100644 --- a/src/Metabox.php +++ b/src/Metabox.php @@ -83,7 +83,7 @@ class Metabox $fields = [$fields]; } - foreach ($fields as $field) { + foreach ($fields as &$field) { // set the field's parent $field->parent($this->key); -- cgit v1.2.3