[wp-trac] [WordPress Trac] #23837: Twenty Ten: Fatal error in loop.php
WordPress Trac
noreply at wordpress.org
Fri Mar 22 16:40:39 UTC 2013
#23837: Twenty Ten: Fatal error in loop.php
---------------------------+------------------
Reporter: keoshi | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.6
Component: Bundled Theme | Version:
Severity: major | Resolution:
Keywords: |
---------------------------+------------------
Comment (by lancewillett):
Replying to [comment:6 SergeyBiryukov]:
> Replying to [comment:5 lancewillett]:
> > Oh, wait -- "Restore WP_Error return to get_term_link()" in r17437. :|
>
> Seems like Twenty Ten should either use `get_category_link()`, which
still returns an empty string on error (but only accepts category ID or
object), or add `is_wp_error()` check.
> Template tags should never return WP_Error - I think that should be a
rule
> That seems prudent. WordPress themes are popular partly because of
simplicity. Handling error objects isn't simple.
Via https://core.trac.wordpress.org/ticket/16521#comment:4
I tend to agree with that ^. So maybe switching to {{{get_category_link}}}
is the way to go.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23837#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list