Fix for cron_tasks.inc.http.10.apache.php on 1315
Error should have been fixed in #24 but the following error still
occured if $this->settings['phpfpm']['configdir'] is not available:
```
PHP Warning: readdir() expects parameter 1 to be resource, boolean
given in /var/www/froxlor/scripts/jobs/cron_tasks.inc.http.10.apache.php
on line 1315
```
Structure of the fix is the same as in
f5bc81faca but copied to the other
section.
This commit is contained in:
@@ -1312,6 +1312,7 @@ class apache
|
|||||||
$configdir = $this->settings['phpfpm']['configdir'];
|
$configdir = $this->settings['phpfpm']['configdir'];
|
||||||
$phpfpm_file_dirhandle = opendir($this->settings['phpfpm']['configdir']);
|
$phpfpm_file_dirhandle = opendir($this->settings['phpfpm']['configdir']);
|
||||||
|
|
||||||
|
if ($phpfpm_file_dirhandle !== false) {
|
||||||
while(false !== ($phpfpm_filename = readdir($phpfpm_file_dirhandle)))
|
while(false !== ($phpfpm_filename = readdir($phpfpm_file_dirhandle)))
|
||||||
{
|
{
|
||||||
if($phpfpm_filename != '.'
|
if($phpfpm_filename != '.'
|
||||||
@@ -1324,6 +1325,9 @@ class apache
|
|||||||
unlink(makeCorrectFile($this->settings['phpfpm']['configdir'] . '/' . $phpfpm_filename));
|
unlink(makeCorrectFile($this->settings['phpfpm']['configdir'] . '/' . $phpfpm_filename));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$this->logger->logAction(CRON_ACTION, LOG_WARNING, "WARNING!! PHP-FPM configuration path could not be read (".$this->settings['phpfpm']['configdir'].")");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user