[wp-trac] [WordPress Trac] #18892: php notice: invalid index on get_page_by_path

WordPress Trac wp-trac at lists.automattic.com
Sun Oct 9 10:20:12 UTC 2011


#18892: php notice: invalid index on get_page_by_path
--------------------------+-----------------------------
 Reporter:  macbrink      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Query         |    Version:  3.3
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 On my blog , I have two pages;
 /lazyest/gallery and /gallery
 When, I call /gallery , get_page_by_path issues a php notice:
  Notice: Undefined index: 1358 in E:\Wampserver\www\wordpress\wp-
 includes\post.php on line 3173
 var_dump of pages array:

 {{{
 pages = Array (
   [11] => stdClass Object ( [ID] => 11 [post_name] => gallery
   [post_parent] => 1358 )
   [12] => stdClass Object ( [ID] => 12 [post_name] => gallery
   [post_parent] => 0 )
 )
 }}}


 where 12 =  ID of page showing

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18892>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list