Opened 16 years ago
Closed 16 years ago
#15402 closed defect (bug) (fixed)
Error suppression in wp-db is lame
| Reported by: | westi | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1 |
| Component: | Database | Version: | 3.1 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: | Focuses: |
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
@
16 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
@
16 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
[16320] introduced this warning.