Opened 7 years ago
Last modified 3 years ago
#40779 new defect (bug)
function_exists() audit in wp-db.php
Reported by: | johnjamesjacoby | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | low |
Severity: | minor | Version: | |
Component: | Database | Keywords: | 2nd-opinion |
Focuses: | Cc: |
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.
Removing
needs-testing
until ticket is marked asneeds-patch
orhas-patch
.