Opened 16 years ago
Closed 16 years ago
#10892 closed defect (bug) (invalid)
msql query fails when running set names utf8
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 2.8 |
| Component: | General | Keywords: | reporter-feedback |
| Focuses: | Cc: |
Description
There is code on line 367 of wordpress/wp-includes/wp-db.php which does a db query of SET NAMES 'utf8'. The code in query can't handle this correctly as it expects it to return a number of rows which it doesn't so the line
while ($i < @mysql_num_fields($this->result)) {
in the query function fails.
The easy fix for this is to add
} elseif ( preg_match("/
s*(set) /i",$query) ) {
return 0;
as part of the if statement around line 700.
Change History (2)
Note: See
TracTickets for help on using
tickets.
This code already does return 0 rows affected in this case.
I cannot reproduce your bug can you provide more information.