Commit 50ac9d3b authored by Dries's avatar Dries

- Patch #32103 by nedjo: fixed title validation.

parent cba3391b
......@@ -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.'));
}
}
}
......
......@@ -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.'));
}
}
}
......
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