Fix for PHP5.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6b786567a3
commit
23b42b5fc0
|
@ -735,10 +735,10 @@ function upgrade_110() {
|
|||
}
|
||||
|
||||
// Convert passwords to MD5 and update table appropiately
|
||||
$query = 'DESCRIBE '.$wpdb->users.' user_pass';
|
||||
$res = $wpdb->get_results($query);
|
||||
if ($res[0]['Type'] != 'varchar(32)') {
|
||||
$wpdb->query('ALTER TABLE '.$wpdb->users.' MODIFY user_pass varchar(64) not null');
|
||||
|
||||
$user_table = $wpdb->get_row("DESCRIBE $wpdb->users user_pass");
|
||||
if ($user_table->Type != 'varchar(32)') {
|
||||
$wpdb->query("ALTER TABLE $wpdb->users MODIFY user_pass varchar(64) not null");
|
||||
}
|
||||
|
||||
$query = 'SELECT ID, user_pass from '.$wpdb->users;
|
||||
|
|
Loading…
Reference in New Issue