Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#34424 closed defect (bug) (wontfix)

Fix return even though it has already been echo in timer_stop()

Reported by: next-season's profile NExt-Season Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: General Keywords: needs-patch
Focuses: Cc:

Description (last modified by swissspidy)

Don't return the result when it has been echoed in timer_stop()

Attachments (2)

load.diff (453 bytes) - added by NExt-Season 9 years ago.
load.2.diff (476 bytes) - added by NExt-Season 9 years ago.
ReFix

Download all attachments as: .zip

Change History (7)

@NExt-Season
9 years ago

#1 @swissspidy
9 years ago

  • Description modified (diff)
  • Keywords needs-patch added
  • Summary changed from Fix return even though it has already been echo in "wp-includes/load.php" to Fix return even though it has already been echo in timer_stop()

Welcome to trac and thanks for your contribution :)

Definitely a good catch! Just note that you're missing a closing } after the return statement.

@NExt-Season
9 years ago

ReFix

#2 @SergeyBiryukov
9 years ago

I don't see an issue with always returning the value.

wp_nonce_field() and wp_referer_field() do the same.

#4 @SergeyBiryukov
9 years ago

Yeah, but timer_stop() is a utility function, not a template tag.

#5 @johnbillion
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Thanks for the patch, but this is fine as it is.

Note: See TracTickets for help on using tickets.