From 280091a00ffad04d3da8e4540c346f9c2003df14 Mon Sep 17 00:00:00 2001 From: Sebastian Lenz Date: Wed, 2 May 2018 14:29:00 +0200 Subject: [PATCH] Fix missing owner when saving drafts, fixes #19 --- src/fields/LinkField.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fields/LinkField.php b/src/fields/LinkField.php index 10a86a7..c477105 100644 --- a/src/fields/LinkField.php +++ b/src/fields/LinkField.php @@ -94,7 +94,9 @@ function ($key) { // Finally, if it is an array it is a serialized value } elseif (is_array($value)) { - $attr = $value; + $attr = [ + 'owner' => $element, + ] + $value; } if (isset($attr['type']) && !$this->isAllowedLinkType($attr['type'])) {