Opened 15 years ago
Closed 15 years ago
#15402 closed defect (bug) (fixed)
Error suppression in wp-db is lame
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 3.1 | Priority: | normal |
| Severity: | normal | Version: | 3.1 |
| Component: | Database | Keywords: | needs-patch |
| Focuses: | Cc: |
Description
WARNING: wp-includes/wp-db.php:1018 - mysql_free_result() expects parameter 1 to be resource, boolean given
This is suppressed by an @ but is probably a bug.
We should try and get rid of all the error suppressions.
Change History (8)
#2
@
15 years ago
We call wpdb::flush() immediately in wpdb::query(). That means that originally, _mysql_last_result is still null, rather than holding a resource.
#3
@
15 years ago
mysql_free_result() returns true on success, false on failure, and only emits a warning if called on a non-resource. A simple is_resource() check is thus enough to remove the error suppression there, as another type of resource should never get in there.
Note: See
TracTickets for help on using
tickets.
[16320] introduced this warning.