#3156 closed defect (bug) (fixed)
Uninitialized var (PHP Notice) in ternary expressions - wp-db.php
| Reported by: | alexkingorg | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.3 |
| Component: | General | Version: | 2.1 |
| Severity: | normal | Keywords: | has-patch 2nd-opinion |
| Cc: | Focuses: |
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
@
20 years ago
- Resolution fixed
- Status closed → 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
@
20 years ago
Actually, nevermind on that. I'm not seeing why this would make a difference. Weird.
#6
@
20 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
@
19 years ago
- Resolution → fixed
- Status reopened → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
patch