﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
17921	$curpage->post_parent and $curpage->post_name checks	adamnbowen		"So I'm not entirely sure the ""root cause"" of the problem, but I've encountered an issue with wp-includes/post.php.  It seems to stem from the fact that there are not proper isset() checks being performed on properties of $curpage before they are accessed.  

Below is the backtrace (note that this was on v 3.1.3, which has different line numbers from my patch, which was on the svn trunk):

Backtrace from warning 'Trying to get property of non-object' at /var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/wp-includes/post.php 3163:
	.	/var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/wp-includes/query.php 1600 calling get_page_by_path()
	.	/var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/wp-includes/query.php 1889 calling parse_query()
	.	/var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/wp-includes/query.php 2895 calling get_posts()
	.	/var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/wp-includes/class-wp.php 454 calling query()
	.	/var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/wp-includes/class-wp.php 501 calling query_posts()
	.	/var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/wp-includes/functions.php 1527 calling main()
	.	/var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/wp-blog-header.php 14 calling wp()
	.	/var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/index.php 17 calling require()

Backtrace from warning 'Trying to get property of non-object' at /var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/wp-includes/post.php 3158:
	.	/var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/wp-includes/query.php 1600 calling get_page_by_path()
	.	/var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/wp-includes/query.php 1889 calling parse_query()
	.	/var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/wp-includes/query.php 2895 calling get_posts()
	.	/var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/wp-includes/class-wp.php 454 calling query()
	.	/var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/wp-includes/class-wp.php 501 calling query_posts()
	.	/var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/wp-includes/functions.php 1527 calling main()
	.	/var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/wp-blog-header.php 14 calling wp()
	.	/var/www/vhosts/wisdomadhesives.com/subdomains/dev/httpdocs/index.php 17 calling require()

Again, I'm not sure, but this may come from some of our own experimentation with taxonomies.

Anyhow, I'm attaching the change I was able to make that solved the problem for me"	defect (bug)	closed	normal		General	3.1.3	normal	duplicate	has-patch	
