From cb36ef37cc1d10c01c1bca4a9d04d0f3d00e4ae5 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Fri, 13 Aug 2004 18:17:10 +0000 Subject: #10033: by Jonbob, make sure no filter check is done until the first preview. --- modules/comment.module | 2 +- modules/comment/comment.module | 2 +- modules/node.module | 2 +- modules/node/node.module | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/comment.module b/modules/comment.module index 740bc1131..4b1b0a640 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -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.')); } diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 740bc1131..4b1b0a640 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -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.')); } diff --git a/modules/node.module b/modules/node.module index f6e7c5869..a0e67e710 100644 --- a/modules/node.module +++ b/modules/node.module @@ -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.')); } diff --git a/modules/node/node.module b/modules/node/node.module index f6e7c5869..a0e67e710 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -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.')); } -- cgit v1.2.3