[wp-trac] [WordPress Trac] #65423: Is it safe to remove function_exists( 'ini_get' ) checks?
WordPress Trac
noreply at wordpress.org
Fri Jun 5 13:17:53 UTC 2026
#65423: Is it safe to remove function_exists( 'ini_get' ) checks?
--------------------------+-----------------------------
Reporter: siliconforks | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: minor | Keywords:
Focuses: |
--------------------------+-----------------------------
I noticed that there are several places in WordPress where a check is made
for `function_exists( 'ini_get' )`:
https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-
admin/includes/class-wp-debug-data.php#L391
https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-
admin/includes/class-wp-debug-data.php#L679
https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-
admin/includes/class-wp-debug-data.php#L1980
https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-
admin/includes/class-wp-site-health.php#L2315
https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-
includes/functions.php#L8841
However, there's a lot of other places in the code that simply call
`ini_get()` with no `function_exists()` check. If you try to run
WordPress with `disable_functions=ini_get`, it will simply crash the first
time it calls `ini_get()`. So in practice I think `ini_get()` is simply a
requirement needed to run WordPress? In that case, there's not much point
in having all these `function_exists( 'ini_get' )` checks - you could
remove quite a bit of (essentially dead) code there...
See also: #37681
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65423>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list