Opened 9 years ago
Last modified 5 years ago
#40779 new defect (bug)
function_exists() audit in wp-db.php
| Reported by: | johnjamesjacoby | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | Awaiting Review |
| Component: | Database | Version: | |
| Severity: | minor | Keywords: | 2nd-opinion |
| Cc: | Focuses: |
Description (last modified by )
A few function_exists() checks can be removed from wp-db.php, thanks to recent load order changes, probably nobody having looked in a while, and generally being afraid to break DB drop-ins:
All of these functions are in files now loaded ahead of require_wp_db():
is_multisite(load.php)_deprecated_function(functions.php)mb_strlen(compat.php)
Bonus:
mb_check_encoding()could *maybe* be a new function in compat.php (it's used 3 times in core, using@orfunction_exists)
The only caveats are the installation process, and 10+ year-old HyperDB versions that do the old-school deep-integration thing, of directly including files – they'll need extra scrutiny.
Change History (2)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Removing
needs-testinguntil ticket is marked asneeds-patchorhas-patch.