From 2a40219b33061cce97304cf4600a33c4c6520419 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 23 Dec 2005 00:32:15 +0000 Subject: [PATCH] Hide errors when getting usermeta in case we're upgrading and usermeta doesn't exist yet. fixes #2110 git-svn-id: http://svn.automattic.com/wordpress/trunk@3343 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable-functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/pluggable-functions.php b/wp-includes/pluggable-functions.php index f0e917da4a..a75984f02f 100644 --- a/wp-includes/pluggable-functions.php +++ b/wp-includes/pluggable-functions.php @@ -42,7 +42,9 @@ function get_userdata( $user_id ) { if ( !$user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID = '$user_id' LIMIT 1") ) return false; + $wpdb->hide_errors(); $metavalues = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->usermeta WHERE user_id = '$user_id'"); + $wpdb->show_errors(); if ($metavalues) { foreach ( $metavalues as $meta ) { @@ -85,7 +87,9 @@ function get_userdatabylogin($user_login) { if ( !$user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE user_login = '$user_login'") ) return false; + $wpdb->hide_errors(); $metavalues = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->usermeta WHERE user_id = '$user->ID'"); + $wpdb->show_errors(); if ($metavalues) { foreach ( $metavalues as $meta ) {