Making WordPress.org

Opened 6 years ago

Closed 6 years ago

#3375 closed defect (bug) (fixed)

The schedule shortcode is echoeing an extra "1"

Reported by: imath's profile imath Owned by: coreymckrill's profile coreymckrill
Milestone: Priority: normal
Component: WordCamp Site & Plugins Keywords:
Cc:

Description

Although the favourite schedule email feature is disabled by default as email_fav_sessions_disabled() should prevent the favorite form to be displayed, the form is actually displayed and an extra "1" comes with it. See our WordCamp's schedule (above "Les Ateliers")

PS: i've used a css rule to hide the form and the stars

After looking at the code we think the problem is at line 755 of /wc-post-types/wc-post-types.php.

Instead of ob_end_flush() We suggest to use :

$email_form = ob_get_contents();
ob_end_clean();

Change History (3)

#1 @coreymckrill
6 years ago

  • Owner set to coreymckrill
  • Status changed from new to assigned

#2 @coreymckrill
6 years ago

Just noting that the email feature has actually been enabled at this point in r6349

#3 @coreymckrill
6 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 6379:

WordCamp Schedule: Use correct output buffer function for email schedule form

The ob_end_flush function actually returns a boolean instead of the contents
of the buffer. ob_get_clean combines the functionality of ob_get_contents
and ob_end_clean, and so correctly returns the contents of the buffer.

Props imath, coreymckrill
Fixes #3375

Note: See TracTickets for help on using tickets.