Fix Undefined array key "fperm" warning
Also removed a few, now unnecessary `!empty` checks Fixes #3382
This commit is contained in:
parent
ee4f28e375
commit
2342034612
|
@ -274,7 +274,7 @@ class PluginController
|
|||
$backup = $file . '.bak';
|
||||
if (file_exists($backup)) @unlink($backup);
|
||||
if (!@copy($file, $backup)) return false;
|
||||
if (!empty($conf['fperm'])) chmod($backup, $conf['fperm']);
|
||||
if ($conf['fperm']) chmod($backup, $conf['fperm']);
|
||||
}
|
||||
//check if can open for writing, else restore
|
||||
return io_saveFile($file, $out);
|
||||
|
|
|
@ -942,7 +942,7 @@ class Indexer {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
if (!empty($conf['dperm'])) {
|
||||
if ($conf['dperm']) {
|
||||
chmod($lock, $conf['dperm']);
|
||||
}
|
||||
return $status;
|
||||
|
|
|
@ -156,7 +156,7 @@ class BulkSubscriptionSender extends SubscriptionSender
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!empty($conf['dperm'])) {
|
||||
if ($conf['dperm']) {
|
||||
chmod($lock, $conf['dperm']);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -402,8 +402,9 @@ function init_creationmodes(){
|
|||
unset($conf['dmask']);
|
||||
unset($conf['fmask']);
|
||||
unset($conf['umask']);
|
||||
unset($conf['fperm']);
|
||||
unset($conf['dperm']);
|
||||
|
||||
$conf['fperm'] = false;
|
||||
$conf['dperm'] = false;
|
||||
|
||||
// get system umask, fallback to 0 if none available
|
||||
$umask = @umask();
|
||||
|
|
|
@ -410,7 +410,7 @@ function io_lock($file){
|
|||
if ((time() - $timeStart) > 3) break;
|
||||
$locked = @mkdir($lockDir, $conf['dmode']);
|
||||
if($locked){
|
||||
if(!empty($conf['dperm'])) chmod($lockDir, $conf['dperm']);
|
||||
if($conf['dperm']) chmod($lockDir, $conf['dperm']);
|
||||
break;
|
||||
}
|
||||
usleep(50);
|
||||
|
|
Loading…
Reference in New Issue