Headers Already Sent / setcookie Warning
-
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!
- The topic ‘Headers Already Sent / setcookie Warning’ is closed to new replies.