[wp-trac] [WordPress Trac] #15087: notice causing warning in rewrite.php
WordPress Trac
wp-trac at lists.automattic.com
Mon Oct 11 00:22:28 UTC 2010
#15087: notice causing warning in rewrite.php
---------------------------+------------------------------------------------
Reporter: davidsword | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Rewrite Rules | Version: 3.1
Severity: minor | Keywords:
---------------------------+------------------------------------------------
in wp-login, and other pages in the admin and site - while having debug
enabled, multi-site in use, and a url rewrite of: {{{
/%postname%/%post_id%/ }}}
gives me ''Notice: Trying to get property of non-object in ..../wp-
includes/rewrite.php on line 341'' which prints a header output warning
crippling the page..
turning debug off hides this. but adding is_object() in line 341 as below:
{{{
if ( is_object( $query->post ) && ( $query->is_single || $query->is_page )
)
}}}
solves the problem.
''(I don't know if this is helpful & what you're suposed to submit to
trac, but it's just been bugging me on a lot of sites, thought I'd make a
note of it)''
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15087>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list