Notice fixes from DD32. see #7509

git-svn-id: https://develop.svn.wordpress.org/trunk@9596 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-11-10 18:54:18 +00:00
parent e25c585f4f
commit 83e002f20b
16 changed files with 54 additions and 40 deletions

View File

@@ -1691,7 +1691,7 @@ class WP_Query {
$q['name'] = $q['pagename'];
$where .= " AND ($wpdb->posts.ID = '$reqpage')";
$reqpage_obj = get_page($reqpage);
if ( 'attachment' == $reqpage_obj->post_type ) {
if ( is_object($reqpage_obj) && 'attachment' == $reqpage_obj->post_type ) {
$this->is_attachment = true;
$this->is_page = true;
$q['attachment_id'] = $reqpage;