Skip to content

Commit

Permalink
Fix #12638: allow_url_fopen php.ini setting is boolean
Browse files Browse the repository at this point in the history
Function url_get( $p_url ) in url_api.php file doesn't work properly
when 'allow_url_fopen' is set to 'Off'. Instead of using a generic
ini_get() call we should instead use the ini_get_boolean() call to get
this PHP configuration value.

Thanks to loginus for reporting this issue and providing this patch.
  • Loading branch information
davidhicks committed Jan 7, 2011
1 parent 25ee1ca commit 2c60cda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/url_api.php
Expand Up @@ -36,7 +36,7 @@
function url_get( $p_url ) {

# Generic PHP call
if( ini_get( 'allow_url_fopen' ) ) {
if( ini_get_bool( 'allow_url_fopen' ) ) {
return @file_get_contents( $p_url );
}

Expand Down

0 comments on commit 2c60cda

Please sign in to comment.