Warning: Cannot modify header information – query.php
I started a brand new WordPress website today using 3.0.1. When I try to go to any of the pages (not posts) that I created, I get the following error:
Notice: Only variables should be assigned by reference in /home/content/b/r/o/brookoflife/html/bol_wp/wp-includes/query.php on line 1508
Warning: Cannot modify header information – headers already sent by (output started at /home/content/b/r/o/brookoflife/html/bol_wp/wp-includes/query.php:1508) in /home/content/b/r/o/brookoflife/html/bol_wp/wp-includes/pluggable.php on line 890
It’s really weird, because it’s in one of the core files and I don’t mess with those. I went to line 1508 in the query.php file and noticed the following line:
$this->queried_object =& get_page_by_path($qv['pagename']);
I removed the ampersand, saved the file, and I don’t get the error anymore. The pages display like normal.
Has anyone come across this? I’m kind of worried since I just modified a core WordPress file. I don’t want this to start screwing up later on. Any help would be appreciated.
- The topic ‘Warning: Cannot modify header information – query.php’ is closed to new replies.