Commit cb36ef37 authored by Steven Wittens's avatar Steven Wittens

#10033: by Jonbob, make sure no filter check is done until the first preview.

parent a36304af
......@@ -458,7 +458,7 @@ function comment_validate_form($edit) {
/*
** Validate filter format
*/
if (!filter_access($edit['format'])) {
if (array_key_exists('format', $edit) && !filter_access($edit['format'])) {
form_set_error('format', t('The supplied input format is invalid.'));
}
......
......@@ -458,7 +458,7 @@ function comment_validate_form($edit) {
/*
** Validate filter format
*/
if (!filter_access($edit['format'])) {
if (array_key_exists('format', $edit) && !filter_access($edit['format'])) {
form_set_error('format', t('The supplied input format is invalid.'));
}
......
......@@ -1097,7 +1097,7 @@ function node_validate($node) {
node_invoke_nodeapi($node, 'validate');
// Check input format access
if (!filter_access($node->format)) {
if (array_key_exists('format', $node) && !filter_access($node->format)) {
form_set_error('format', t('The supplied input format is invalid.'));
}
......
......@@ -1097,7 +1097,7 @@ function node_validate($node) {
node_invoke_nodeapi($node, 'validate');
// Check input format access
if (!filter_access($node->format)) {
if (array_key_exists('format', $node) && !filter_access($node->format)) {
form_set_error('format', t('The supplied input format is invalid.'));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment