#21533 closed defect (bug) (fixed)
Error suppression in wp-db is lame: Part 2
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Warnings/Notices | Version: | 3.4.1 |
| Severity: | normal | Keywords: | has-patch needs-unit-tests |
| Cc: | scribu, kpayne@…, dkikizas@… |
Description
Previously: #15402
This was fixed in [16321] however that was built upon [16320] and both were reverted in [16336] because it "Breaks things". What things it breaks I have no idea though (bad westi for not using a better commit message ;)). However I assume it was [16320] that broke things and not [16321].
[16321] seems perfectly valid to me and we should re-apply it along with a fix to __get() that throws a warning when $result isn't set yet.
Attachments (3)
Change History (16)
Viper007Bond — 9 months ago
comment:1
SergeyBiryukov — 9 months ago
- Milestone changed from Awaiting Review to 3.5
comment:5
in reply to:
↑ 3
;
follow-up:
↓ 6
Viper007Bond — 9 months ago
Replying to westi:
From memory what this broke was HyperDB on WP.org
Checking if it was a resource was what broke it? Crazy...
comment:6
in reply to:
↑ 5
SergeyBiryukov — 9 months ago
Replying to Viper007Bond:
Checking if it was a resource was what broke it? Crazy...
I guess westi was referring to [16320].
Unit test added. It functions the same way as debug bar -- by spying on the error handler.
comment:9
SergeyBiryukov — 9 months ago
Closed #21574 as a duplicate.
comment:10
follow-up:
↓ 11
scribu — 9 months ago
I now get this notice on every admin page in trunk:
WARNING: wp-includes/wp-db.php:1079 - mysql_free_result() expects parameter 1 to be resource, boolean given
comment:11
in reply to:
↑ 10
Viper007Bond — 9 months ago
Replying to scribu:
I now get this notice on every admin page in trunk:
Yep, this is why this ticket was opened. See above. ;)
comment:13
nacin — 9 months ago
In [21513]:

Since [21472], I get errors in Debug Bar:
Moved to wpdb::flush(), mysql_free_result() now runs earlier than $this->result is set:
http://core.trac.wordpress.org/browser/trunk/wp-includes/wp-db.php?rev=21473#L1138
21533.patch fixes the warning.