Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c6ad34e

Browse files
committedSep 14, 2011
Fix #13303: use strtolower in ini_get_bool()
Generally, ini_get() returns '0' or '1' when querying a boolean option, regardless of the actual string used to set it (i.e. On, False, etc). However, in some cases (e.g. when the option is set in httpd.conf via php_admin_value instead of php_admin_flag), ini_get() returns the string itself instead. This caused ini_get_bool() to wrongly return False when the option is set to an equivalent of True but with a different case ('On', 'TRUE').
1 parent cc74546 commit c6ad34e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎core/utility_api.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function ini_get_bool( $p_name ) {
8181
$result = ini_get( $p_name );
8282

8383
if( is_string( $result ) ) {
84-
switch( $result ) {
84+
switch( strtolower( $result ) ) {
8585
case 'off':
8686
case 'false':
8787
case 'no':

0 commit comments

Comments
 (0)
Please sign in to comment.