Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/06/2015 09:14:50 PM (5 years ago)
Author:
boonebgorges
Message:

Don't let bp_create_excerpt() truncate to empty strings.

When the first word of a string is longer than the $length param, the word
should be truncated mid-word, even if exact=false.

Fixes #6254.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-template.php

    r9702 r9707  
    745745    if ( empty( $r['exact'] ) ) {
    746746        $spacepos = mb_strrpos( $truncate, ' ' );
    747         if ( isset( $spacepos ) ) {
     747        if ( false !== $spacepos ) {
    748748            if ( $r['html'] ) {
    749749                $bits = mb_substr( $truncate, $spacepos );
Note: See TracChangeset for help on using the changeset viewer.