PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » PEAR » PEAR » Bug #4021

PEAR_Config file_exists can cause warnings

Details

Submitted2005-03-31 21:18 UTC
Fromkluge at ira dot uka dot de
Assignedcellog
StatusClosed
PackagePEAR
PHP Version4.3.1
OSlinux
Roadmaps(Not assigned)

Comments

[2005-03-31 21:18 UTC] kluge at ira dot uka dot de

Description:
------------
in PEAR/PEAR/Config.php on line 426 and 429 (pear version 1.3.5) - dissable warnings with @file_exists(..)
will give no warnings if you have some hard restrictions for file operations:

supposed changed line 426:
if ($user_file && @file_exists($user_file)) {

supposed changed line 429:
if ($system_file && @file_exists($system_file)) {

Reproduce code:
---------------
if ($user_file && @file_exists($user_file)) {
$this->readConfigFile($user_file);
}
if ($system_file && @file_exists($system_file)) {
$this->mergeConfigFile($system_file, false, 'system');
}

Expected result:
----------------
it will not send warnings anymore - so you can see images!!!

Actual result:
--------------
output of warnings when file operations are restricted to specific directories