[wp-trac] [WordPress Trac] #13510: TwentyTen: Empty archives result in PHP Notices

WordPress Trac wp-trac at lists.automattic.com
Mon May 24 07:11:18 UTC 2010


#13510: TwentyTen: Empty archives result in PHP Notices
--------------------------+-------------------------------------------------
 Reporter:  dd32          |       Owner:     
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.0
Component:  Themes        |     Version:  3.0
 Severity:  normal        |    Keywords:     
--------------------------+-------------------------------------------------
 Hit a page which will display no posts (but is a valid page), for example
 /custom_taxonomy/empty_term/ archive.php will cause a PHP notice to be
 raised due to calling the_post() without first checking if posts exist.

 Warnings produced:

 {{{
 Notice: Undefined offset: 0 in C:\www\davis\wp-includes\query.php on line
 2551

 Notice: Trying to get property of non-object in C:\www\davis\wp-
 includes\query.php on line 2845

 Notice: Trying to get property of non-object in C:\www\davis\wp-
 includes\query.php on line 2847

 Notice: Trying to get property of non-object in C:\www\davis\wp-
 includes\query.php on line 2849

 Notice: Trying to get property of non-object in C:\www\davis\wp-
 includes\query.php on line 2850

 Notice: Trying to get property of non-object in C:\www\davis\wp-
 includes\query.php on line 2857

 Notice: Trying to get property of non-object in C:\www\davis\wp-
 includes\query.php on line 2868

 }}}

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


More information about the wp-trac mailing list