Commit 8fe244ff authored by Dries's avatar Dries
Browse files

- Patch #51522 by paddy: break at beginning doesn't work

parent dda13158
......@@ -156,7 +156,7 @@ function node_teaser($body, $format = NULL) {
$delimiter = strpos($body, '<!--break-->');
// If the size is zero, and there is no delimiter, the entire body is the teaser.
if ($size == 0 && $delimiter == 0) {
if ($size == 0 && $delimiter === false) {
return $body;
}
......@@ -171,7 +171,7 @@ function node_teaser($body, $format = NULL) {
}
// If a valid delimiter has been specified, use it to chop of the teaser.
if ($delimiter > 0) {
if ($delimiter >= 0) {
return substr($body, 0, $delimiter);
}
......
......@@ -156,7 +156,7 @@ function node_teaser($body, $format = NULL) {
$delimiter = strpos($body, '<!--break-->');
// If the size is zero, and there is no delimiter, the entire body is the teaser.
if ($size == 0 && $delimiter == 0) {
if ($size == 0 && $delimiter === false) {
return $body;
}
......@@ -171,7 +171,7 @@ function node_teaser($body, $format = NULL) {
}
// If a valid delimiter has been specified, use it to chop of the teaser.
if ($delimiter > 0) {
if ($delimiter >= 0) {
return substr($body, 0, $delimiter);
}
......
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