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
This commit is contained in:
Steve 2016-11-30 14:49:03 +13:00 committed by GitHub
parent afb7652459
commit c034838c71

View File

@ -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;
}
}