View Issue Details

IDProjectCategoryView StatusLast Update
0012638mantisbtintegrationpublic2011-04-05 14:23
Reporterloginus Assigned Todhx  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.4 
Target Version1.2.5Fixed in Version1.2.5 
Summary0012638: function url_get doesn't support 'allow_url_fopen'='Off'
Description

I detected this bug when trying to use "source-integration" plugin.

Function url_get( $p_url ) in url_api.php file doesn't work properly when 'allow_url_fopen' is set to 'Off'.

I fixed it replacing code:
function url_get( $p_url ) {

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

to:
function url_get( $p_url ) {

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

Possibly the problem ocurs also in other functions

Tagspatch

Activities

dhx

dhx

2011-01-07 05:48

reporter   ~0027847

Thanks for the bug report and patch loginus. I have committed your patch.

Related Changesets

MantisBT: master 2c60cda4

2011-01-07 05:45

dhx


Details Diff
Fix 0012638: allow_url_fopen php.ini setting is boolean

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.
Affected Issues
0012638
mod - core/url_api.php Diff File

MantisBT: master-1.2.x ffd70d46

2011-01-07 05:45

dhx


Details Diff
Fix 0012638: allow_url_fopen php.ini setting is boolean

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.
Affected Issues
0012638
mod - core/url_api.php Diff File