[wp-trac] [WordPress Trac] #16385: Catchable fatal error in WP 3.1 RC3 - echo get_category_link

WordPress Trac wp-trac at lists.automattic.com
Mon Jan 31 11:58:45 UTC 2011


#16385: Catchable fatal error in WP 3.1 RC3 - echo get_category_link
---------------------------------------------------+----------------------
 Reporter:  vasylesku                              |       Owner:
     Type:  defect (bug)                           |      Status:  closed
 Priority:  normal                                 |   Milestone:
Component:  General                                |     Version:  3.1
 Severity:  normal                                 |  Resolution:  wontfix
 Keywords:  reporter-feedback needs-investigating  |
---------------------------------------------------+----------------------
Changes (by markjaquith):

 * status:  reopened => closed
 * resolution:   => wontfix
 * milestone:  3.1 =>


Comment:

 Passing a blank string:

 {{{var_dump( get_category_link("") );}}}

 WordPress 3.0.4, default permalinks:

 > string(21) "http://wp30.dev/?cat="

 WordPress 3.0.4, pretty permalinks:

 > object(WP_Error)#78 (2) { ["errors"]=> array(1) { ["invalid_term"]=>
 array(1) { [0]=> string(10) "Empty Term" } } ["error_data"]=> array(0) { }
 }

 WordPress 3.1, default permalinks:

 > object(WP_Error)#181 (2) { ["errors"]=> array(1) { ["invalid_term"]=>
 array(1) { [0]=> string(10) "Empty Term" } } ["error_data"]=> array(0) { }
 }

 WordPress 3.1, pretty permalinks:

 > object(WP_Error)#181 (2) { ["errors"]=> array(1) { ["invalid_term"]=>
 array(1) { [0]=> string(10) "Empty Term" } } ["error_data"]=> array(0) { }
 }

 The only difference is that passing a blank string on a site with default
 permalinks now generates a WP_Error, whereas before it passed a malformed
 URL. The new behavior is more consistent with sites that have pretty
 permalinks enabled.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16385#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list