From c034838c71d20a3e7d0b4d4345586887e8db2962 Mon Sep 17 00:00:00 2001 From: Steve Date: Wed, 30 Nov 2016 14:49:03 +1300 Subject: [PATCH] Update Versioned.php Change isset() to array_key_exists(). In the CMS, if you have a FormField such as 'My value', then you change it to '' (blank), isset() will return false because even though the key exists, the value === null by the time it reaches this point in the code, and isset() return false on null values. array_key_exists will return true with a null value --- model/Versioned.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/Versioned.php b/model/Versioned.php index 6ab3a25a4..c84e2b6a4 100644 --- a/model/Versioned.php +++ b/model/Versioned.php @@ -607,7 +607,7 @@ class Versioned extends DataExtension implements TemplateGlobalProvider { $data = array_intersect_key($data, $fields); foreach ($data as $k => $v) { - if (!isset($newManipulation['fields'][$k])) { + if (!array_key_exists($k, $newManipulation['fields'])) { $newManipulation['fields'][$k] = $v; } }