[wp-trac] [WordPress Trac] #41036: wp_redirect fails with error in WP 4.8 (was: wp_redirect and wp_safe_redirect calls fails in WP 4.8)

WordPress Trac noreply at wordpress.org
Wed Jun 21 20:28:15 UTC 2017


#41036: wp_redirect fails with error in WP 4.8
-------------------------------------------+------------------------------
 Reporter:  dkurth                         |       Owner:
     Type:  defect (bug)                   |      Status:  new
 Priority:  normal                         |   Milestone:  Awaiting Review
Component:  Administration                 |     Version:  4.8
 Severity:  major                          |  Resolution:
 Keywords:  reporter-feedback needs-patch  |     Focuses:
-------------------------------------------+------------------------------
Changes (by dkurth):

 * keywords:  reporter-feedback => reporter-feedback needs-patch
 * severity:  critical => major


Comment:

 This happens in Wordpress 4.8
 In an effort to find out what is causing this problem, I setup a fresh
 WordPress install with no plugins installed.  The same plugin that
 contains the following code, causes this error.

 Warning: Cannot modify header information - headers already sent by
 (output started at /home/debbiekurth/public_html/wp-
 content/themes/twentyseventeen/header.php:16) in
 /home/debbiekurth/public_html/wp-includes/pluggable.php on line 1210

 It is a one line plugin call to wp_redirect.  Already checked for white
 spaces and other issues.

 <?php
 /**
 * Plugin Name: A Redirect
 * Plugin URI: https://mmd-ca.com/MemberTrack/
 * Text Domain: A Redirect
 * Description:
 * Version: 1.0.0
 * Author: Multimedia Designs, LLC
 * Author URI: https://www.mmd-ca.com/
 * License: GPLv3
 * License URI: http://www.gnu.org/licenses/gpl-3.0
 */
 add_shortcode('mmd-redirect', 'mmd_ca_redirect_call');
 function mmd_ca_redirect_call()
 {
 wp_redirect("https://www.mmd-ca.com/");
 }

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41036#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list