Skip to content

Commit

Permalink
FIX: Fixes remaining failing tests introduced in d7dbc81 for 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Russell Michell committed Apr 13, 2017
1 parent 6b7849c commit 00594a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/extensions/JSONTextExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ public function onBeforeWrite()
$owner = $this->getOwner();
$controller = \Controller::curr();
$postVars = $controller->getRequest()->postVars();
$fieldMap = $owner->config()->get('json_field_map');
$doUpdate = (
count($postVars) &&
in_array(get_class($controller), ['CMSPageEditController', 'FakeController']) &&
!empty($owner->config()->get('json_field_map'))
!empty($fieldMap)
);

if (!$doUpdate) {
Expand Down

0 comments on commit 00594a2

Please sign in to comment.