Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#18398 closed defect (bug) (duplicate)

wp_trim_excerpt wrong comperative

Reported by: cedwetzel Owned by:
Milestone: Priority: normal
Severity: major Version: 3.2.1
Component: Formatting Keywords:
Focuses: Cc:


In wp-includes/formatting.php on line 1857 in method wp_trim_excerpt() the text input $text is compared to an empty string. This makes the function not working. Just replace

if ( '' == $text ) {


if ( '' != $text ) {

and it's going to work again.

Attachments (1)

18398.diff (400 bytes) - added by jkudish 4 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 @cedwetzel4 years ago

I mean line 1847, sorry for that fault....

comment:2 @SergeyBiryukov4 years ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

@jkudish4 years ago

comment:3 @jkudish4 years ago

Here's a patch for it

comment:4 @jkudish4 years ago

  • Cc joachim.kudish@… added

comment:5 @jkudish4 years ago

never mind then :)

Note: See TracTickets for help on using tickets.