[wp-trac] [WordPress Trac] #23837: Fatal error on TwentyTen's loop.php

WordPress Trac noreply at wordpress.org
Thu Mar 21 17:43:41 UTC 2013


#23837: Fatal error on TwentyTen's loop.php
-----------------------------+--------------------------
 Reporter:  keoshi           |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Themes
  Version:                   |   Severity:  major
 Keywords:                   |
-----------------------------+--------------------------
 A fatal error is being fired on twentyten's loop.php file, gallery
 portion:

 {{{
 wp-content/themes/pub/twentyten/loop.php:96 - Object of class WP_Error
 could not be converted to string
 }}}

 On '''line 96''' of '''loop.php''' we should be able to output the
 category link. But if the term we're looking up doesn't exist,
 ''get_term_link'' returns a WP_Error, and echo'ing that ''get_term_link''
 throws the fatal error quoted above.

 I've attached a patch that checks if it's "get_term_link" is returning a
 WP_Error.

 This has been reported previously: http://wordpress.org/support/topic
 /get_term_link-throwing-error

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


More information about the wp-trac mailing list