summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2005-09-27 15:09:28 (GMT)
committerDries Buytaert2005-09-27 15:09:28 (GMT)
commit50ac9d3b4c2b76d437ccc563f099444b64585c99 (patch)
tree8f4712adb0d7902812c20f9011403de3ea343b7d
parentcba3391b1f2b1cd1ccb080f671ad52b15006db8d (diff)
- Patch #32103 by nedjo: fixed title validation.
-rw-r--r--modules/node.module6
-rw-r--r--modules/node/node.module6
2 files changed, 8 insertions, 4 deletions
diff --git a/modules/node.module b/modules/node.module
index 3a96826..52e6261 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -1319,8 +1319,10 @@ function node_validate($node) {
*/
function node_validate_title($node, $message = NULL) {
// Validate the title field.
- if (trim($node->title) == '') {
- form_set_error('title', isset($message) ? $message : t('You have to specify a title.'));
+ if (isset($node->title)) {
+ if (trim($node->title) == '') {
+ form_set_error('title', isset($message) ? $message : t('You have to specify a title.'));
+ }
}
}
diff --git a/modules/node/node.module b/modules/node/node.module
index 3a96826..52e6261 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1319,8 +1319,10 @@ function node_validate($node) {
*/
function node_validate_title($node, $message = NULL) {
// Validate the title field.
- if (trim($node->title) == '') {
- form_set_error('title', isset($message) ? $message : t('You have to specify a title.'));
+ if (isset($node->title)) {
+ if (trim($node->title) == '') {
+ form_set_error('title', isset($message) ? $message : t('You have to specify a title.'));
+ }
}
}