Make WordPress Core

Changeset 7481


Ignore:
Timestamp:
03/23/2008 12:55:11 AM (18 years ago)
Author:
ryan
Message:

Make sure IDs are >= 0. see #6305

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/taxonomy.php

    r7431 r7481  
    797797 */
    798798function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) {
    799         if ( 'parent' == $field  || 'term_id' == $field || 'count' == $field || 'term_group' == $field )
     799        if ( 'parent' == $field  || 'term_id' == $field || 'count' == $field || 'term_group' == $field ) {
    800800                $value = (int) $value;
     801                if ( $value < 0 )
     802                        $value = 0;
     803        }
    801804
    802805        if ( 'raw' == $context )
Note: See TracChangeset for help on using the changeset viewer.