WordPress.org

Ready to get started?Download WordPress

Forums

Warning: Cannot modify header information - headers already sent by (output star (3 posts)

  1. craigl
    Member
    Posted 7 years ago #

    I have written a simple widget, and it works except i get error messages when I:

    1.deactivate the widget
    2.log out with the widget activated
    3.log in with the widget activated

    the error messages read

    Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\wordpress\wp-content\plugins\prezzybox_content.php:12) in C:\xampp\htdocs\wordpress\wp-includes\pluggable.php on line 341

    I have read into this error, and there is a lot of suggestion of whitespace preceeding php tags in main wordpress files, but these errors only occur when the widget is active, and there is no whitespace.

    Any help would be much appreciated, im starting to pull my hair out.

  2. The error suggests there is whitespace at line 12 of prezzybox_content.php.

    Are you sure there is nothing after a closing php tag on that line?

  3. craigl
    Member
    Posted 7 years ago #

    There was actually there. Though its now complaining about line 233 which reads:

    Failed to save options

    </div>

    <?php

    }

    }//233

    register_activation_hook(_FILE_,'pb_set_default_options');

    so no white space.

Topic Closed

This topic has been closed to new replies.

About this Topic