BUG 0000 Fix on G:: update_php_ini() function

This commit is contained in:
Erik Amaru Ortiz
2012-05-02 10:15:47 -04:00
parent 80045f99df
commit 4c9f6bdabd

View File

@@ -5043,13 +5043,13 @@ function getDirectorySize($path,$maxmtime=0)
*/ */
function update_php_ini($file, $array) function update_php_ini($file, $array)
{ {
if (!is_writable($file)) {
throw new Exception("File $file, is not writable.");
}
$iniLines = array(); $iniLines = array();
$iniContent = array(); $iniContent = array();
if (file_exists($file) && !is_writable($file)) {
throw new Exception("File $file, is not writable.");
}
if (file_exists($file)) { if (file_exists($file)) {
$iniContent = file($file); $iniContent = file($file);
} }
@@ -5121,6 +5121,7 @@ function getDirectorySize($path,$maxmtime=0)
return $sw; return $sw;
} }
else { else {
if (!in_array($path, $noWritableFiles))
$noWritableFiles[] = $path; $noWritableFiles[] = $path;
return false; return false;