[wp-trac] [WordPress Trac] #31149: Error Object of class stdClass could not be converted to int in ms-functions.php on line 1788
WordPress Trac
noreply at wordpress.org
Tue Jan 27 23:15:48 UTC 2015
#31149: Error Object of class stdClass could not be converted to int in ms-
functions.php on line 1788
--------------------------+-----------------------------
Reporter: hauvong | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
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:
Change from:
$local_id = $wpdb->get_row( $wpdb->prepare( "SELECT term_id FROM
$wpdb->terms WHERE term_id = %d", $global_id ) );
To correction:
$local_id = $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM
$wpdb->terms WHERE term_id = %d", $global_id ) );
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31149>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list