[wp-trac] [WordPress Trac] #13060: Duplicate Term bug
WordPress Trac
wp-trac at lists.automattic.com
Tue Apr 20 15:28:49 UTC 2010
#13060: Duplicate Term bug
--------------------------+-------------------------------------------------
Reporter: DeannaS | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version:
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
There's a bug in the taxonomy edit pages (/wp-admin/edit-tags.php). If you
try to add a term that already exists, the following errors are thrown and
display in a red box at the top of the page:
Warning: mysql_real_escape_string() expects parameter 1 to be string,
array given in /home/xxx/wp-includes/wp-db.php on line 772
Warning: mysql_real_escape_string() expects parameter 1 to be string,
array given in /home/xxx/wp-includes/wp-db.php on line 772
Warning: Cannot modify header information - headers already sent by
(output started at /home/xxx/wp-includes/wp-db.php:772) in
/home/juwcoope/public_html/wp3/wp-includes/classes.php on line 1697
I think the fix is to edit wp-includes\taxonomy.php on lines 1526/1527
like so:
{{{
//elseif ( is_term($slug, $taxonomy) ) // Provided slug issue.
if (is_term($slug, $taxonomy) )
return new WP_Error('term_slug_exists', __('A Term with
the slug provided already exists.'));
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13060>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list