Commit b9e8016f authored by Dries's avatar Dries
Browse files

- Fixed validate problem.  Patch by Ax.
parent d8f78a7c
......@@ -887,10 +887,11 @@ function node_validate($node, &$error) {
** Validate the title field:
*/
$node->title = strip_tags($node->title);
if (isset($node->title) && !$node->title) {
$error["title"] = theme("theme_error", t("You have to specify a valid title."));
if (isset($node->title)) {
$node->title = strip_tags($node->title);
if (!$node->title) {
$error["title"] = theme("theme_error", t("You have to specify a valid title."));
}
}
/*
......
......@@ -887,10 +887,11 @@ function node_validate($node, &$error) {
** Validate the title field:
*/
$node->title = strip_tags($node->title);
if (isset($node->title) && !$node->title) {
$error["title"] = theme("theme_error", t("You have to specify a valid title."));
if (isset($node->title)) {
$node->title = strip_tags($node->title);
if (!$node->title) {
$error["title"] = theme("theme_error", t("You have to specify a valid 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