Skip to content

Commit bda3ee8

Browse files
authored
Add 'document' as content type in case if it's defaulted due to plugin error
is_scalar is not enough validation as it not checks for empty value
1 parent 1e472b3 commit bda3ee8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

manager/actions/mutate_content.dynamic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
}
137137
}
138138

139-
$content['type'] = get_by_key($content, 'type', $defaultContentType, 'is_scalar');
139+
$content['type'] = get_by_key($content, 'type', $defaultContentType, 'is_scalar') ?: $defaultContentType;
140140

141141
if(isset ($_POST['which_editor'])) {
142142
$modx->setConfig('which_editor', get_by_key($_POST, 'which_editor', '', 'is_scalar'));

0 commit comments

Comments
 (0)