-
-
Save anonymous/0d4ecd6d8d7b7c1f981ee9834c2352a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/bp-core/bp-core-template.php b/src/bp-core/bp-core-template.php | |
index 21825050f..6b558fe04 100644 | |
--- a/src/bp-core/bp-core-template.php | |
+++ b/src/bp-core/bp-core-template.php | |
@@ -1017,7 +1017,7 @@ function bp_create_excerpt( $text, $length = 225, $options = array() ) { | |
$is_word_boundary = ' ' === $truncate[ $pos ]; | |
if ( ! $is_word_boundary && isset( $truncate_tags[ $pos - 1 ] ) ) { | |
$preceding_tag = $truncate_tags[ $pos - 1 ]; | |
- if ( ' ' === $truncate[ $preceding_tag['start'] - 1 ] ) { | |
+ if ( isset( $truncate[ $preceding_tag['start'] - 1 ] ) && ' ' === $truncate[ $preceding_tag['start'] - 1 ] ) { | |
$is_word_boundary = true; | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment