Skip to content
Snippets Groups Projects
Commit bad54847 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#180191 by chx: fix notice in teaser handling

parent e9f7072e
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -742,7 +742,7 @@ function node_submit($node) { ...@@ -742,7 +742,7 @@ function node_submit($node) {
if (isset($node->body)) { if (isset($node->body)) {
$node->teaser = node_teaser($node->body, isset($node->format) ? $node->format : NULL); $node->teaser = node_teaser($node->body, isset($node->format) ? $node->format : NULL);
// Chop off the teaser from the body if needed. // Chop off the teaser from the body if needed.
if (!$node->teaser_include && $node->teaser == substr($node->body, 0, strlen($node->teaser))) { if (empty($node->teaser_include) && $node->teaser == substr($node->body, 0, strlen($node->teaser))) {
$node->body = substr($node->body, strlen($node->teaser)); $node->body = substr($node->body, strlen($node->teaser));
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment