• Resolved rlamb2

    (@rlamb2)


    Hi there,

    I have WP_DEBUG on due to some testing for other development and noticed when I click into the Widgets page in the WP backend that your plugin is throwing a PHP Warning:

    Warning: Cannot modify header information - headers already sent by (output started at /home/PATHTOSITE/wp-admin/includes/template.php:1706) in /home/PATHTOSITE/wp-content/plugins/hw-image-widget/hw-image-widget.php on line 15

    Quickfix seems to be to pull the setcookie call out of that function acting on the admin_enqueue_scripts hook after page output has begun and move it (and the enclosing if statement) out to an admin_init action.

    Great plugin though! I’ve started using it on a couple client sites recently. Going pretty well.

    Thanks!

    http://wordpress.org/plugins/hw-image-widget/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Håkan Wennerberg

    (@puffythepirateboy)

    Hi,

    I could not get my local environment to output this notice (apache2/php-fpm 5.4). But it seems like it should, unless output buffering is currently active.

    Anyway, better safe then sorry. I updated the plugin the way you mentioned, setting that cookie earlier in the execution.

    Thanks for the feedback!

    Thread Starter rlamb2

    (@rlamb2)

    Weird, but wow, that was speedy. 🙂

    No problem, thanks for the plugin! Like I said, big help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Headers Already Sent / setcookie Warning’ is closed to new replies.