Warning: Cannot modify header information
-
I’m using the latest version of the plugin from svn, and I’m getting this warning every time I’m saving a draft or publishing a post.
Warning: in_array() expects parameter 2 to be array, string given in /home4/nnn/htdocs/wp-content/plugins/wp-security-audit-log/classes/Sensors/Content.php on line 49 Warning: Cannot modify header information - headers already sent by (output started at /home4/nnn/htdocs/wp-content/plugins/wp-security-audit-log/classes/Sensors/Content.php:49) in /home4/nnn/htdocs/wp-admin/post.php on line 235 Warning: Cannot modify header information - headers already sent by (output started at /home4/nnn/htdocs/wp-content/plugins/wp-security-audit-log/classes/Sensors/Content.php:49) in /home4/nnn/htdocs/wp-includes/pluggable.php on line 1196
I’ve traced the bug coming from the last line here:
protected function RetrieveOldData(){ if (isset($_POST) && isset($_POST['post_ID']) && !(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) && !(isset($_POST['action']) && $_POST['action'] == 'autosave') ){ $postID = intval($_POST['post_ID']); $this->_OldPost = get_post($postID); $this->_OldLink = get_permalink($postID); $this->_OldTmpl = $this->GetPostTemplate($this->_OldPost); $this->_OldCats = $this->GetPostCategories($this->_OldPost); $this->_OldStky = in_array($postID, get_option('sticky_posts')); } }
Version of PHP is:
PHP 5.4.38 (cli) (built: Mar 11 2015 12:43:38) Copyright (c) 1997-2014 The PHP Group
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Warning: Cannot modify header information’ is closed to new replies.