Make WordPress Core

Changes between Initial Version and Version 2 of Ticket #31149


Ignore:
Timestamp:
01/30/2015 12:41:19 PM (10 years ago)
Author:
SergeyBiryukov
Comment:

Introduced in [13925].

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31149

    • Property Focuses multisite added
    • Property Component changed from General to Taxonomy
    • Property Version changed from trunk to 3.0
    • Property Milestone changed from Awaiting Review to 4.2
    • Property Keywords has-patch needs-unit-tests added
  • Ticket #31149 – Description

    initial v2  
    1 Issue cause by $wpdb->get_row return object to $local_id but was pass to global_terms to use as int.  Fix by switching to $wpdb->get_var:
     1Issue cause by `$wpdb->get_row()` return object to `$local_id` but was pass to global_terms to use as int.  Fix by switching to `$wpdb->get_var()`:
    22
    33Change from:
     4{{{
    45$local_id = $wpdb->get_row( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms WHERE term_id = %d", $global_id ) );
     6}}}
    57
    68To correction:
     9{{{
    710$local_id = $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms WHERE term_id = %d", $global_id ) );
     11}}}