#3156 closed defect (bug) (fixed)
Uninitialized var (PHP Notice) in ternary expressions - wp-db.php
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.3 | Priority: | normal |
Severity: | normal | Version: | 2.1 |
Component: | General | Keywords: | has-patch 2nd-opinion |
Focuses: | Cc: |
Description
I'm not sure the best way to fix this. I've attached a patch that I think should work, but someone should put some serious eyeballs on this one.
Attachments (1)
Change History (10)
#3
@
19 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
This caused some weird problems for wpcom - it looked like a cache problem and caused lots of hits on the same queries over and over again. ie.
SELECT option_value FROM wp_options WHERE option_name = 'siteurl' LIMIT 1
repeated about 50 times.
#5
@
19 years ago
Actually, nevermind on that. I'm not seeing why this would make a difference. Weird.
#6
@
19 years ago
Lots of hits on the same queries over and over again can happen if you're using the WP Object Cache (I think you're using a Memcached drop-in on WP.com) and you're querying something that doesn't exist in the DB (like an option).
See #2268
Basically, there's no way to tell the difference between "option isn't in cache" and "option's non-existence has been cached."
This may be related... dunno.
#9
@
18 years ago
- Resolution set to fixed
- Status changed from reopened to closed
Marking this as fixed.
No extra info in nearly a year.
Non-existent options caching went into [4855] which should fix the large number of db queries on cache misses for non-existent options.
Please raise another ticket if you still have issue.
patch