WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#42085 new defect (bug)

Still getting ini_get_all warning message — at Initial Version

Reported by: scottcwilson Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Bootstrap/Load Keywords: needs-patch 2nd-opinion
Focuses: Cc:

Description

For some PHP configurations, the check function_exists does not suffice.

Warning: ini_get_all() has been disabled for security reasons in /home/mysite/public_html/wp-includes/load.php on line 1027

Suggested fix in wp_is_ini_value_changeable()

if ( ! isset( $ini_all ) ) {

$ini_all = false;
Sometimes ini_get_all() is disabled via the disable_functions option for "security purposes".
if ( function_exists( 'ini_get_all' ) ) {

$disabled_functions_raw = explode( ',', ini_get( 'disable_functions' ) );
$disabled_functions = array_map( 'trim', $disabled_functions_raw );
if (!array_search( 'ini_get_all', $disabled_functions ) ) {

$ini_all = ini_get_all();

}

}

}

Change History (0)

Note: See TracTickets for help on using tickets.