[wp-trac] [WordPress Trac] #7602: PHP Fatal Error when static front
& posts pages are set the same
WordPress Trac
wp-trac at lists.automattic.com
Tue Aug 26 20:30:00 GMT 2008
#7602: PHP Fatal Error when static front & posts pages are set the same
----------------------+-----------------------------------------------------
Reporter: thejusme | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.6.2
Component: General | Version: 2.6.1
Severity: major | Keywords:
----------------------+-----------------------------------------------------
When I set the "Front Page Displays" to be static and the same for both
front page and posts, I experience a fatal PHP error when going to my
Wordpress homepage. The error is on like 1619 in wp-includes/query.php:
{{{
$this->queried_object = & get_page(get_option('page_for_posts'));
}}}
It appears this is due to the nested function call on that line, although
I'm not yet sure specifically why this error only occurs when both the
front page and posts values are set the same. If the code above is
replaced with the following code it appears to resolve the error:
{{{
$temp = get_option('page_for_posts');
$temp2 = get_page($temp);
$this->queried_object = & $temp2;
}}}
The reference operator actually appears to be useless because if removed
from my fixed code block everything seems to function well also.
--
Ticket URL: <http://trac.wordpress.org/ticket/7602>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list