Issue 5467: Fix worker and daemon

这个提交包含在:
Michael 2018-07-24 03:42:44 +00:00
父节点 0e719f5398
当前提交 de984cdaa1
共有 2 个文件被更改,包括 3 次插入6 次删除

查看文件

@ -13,9 +13,8 @@ use Friendica\Core\Worker;
use Friendica\Database\DBA;
// Get options
$shortopts = '';
$shortopts .= 'f';
$longopts = [ 'foreground' ];
$shortopts = 'f';
$longopts = ['foreground'];
$options = getopt($shortopts, $longopts);
// Ensure that daemon.php is executed from the base path of the installation

查看文件

@ -1127,7 +1127,7 @@ class App
return;
}
$cmdline = $this->getConfigValue('config', 'php_path', 'php') . ' ' . $command;
$cmdline = $this->getConfigValue('config', 'php_path', 'php') . ' ' . escapeshellarg($command);
foreach ($args as $key => $value) {
if (!is_null($value) && is_bool($value) && !$value) {
@ -1140,8 +1140,6 @@ class App
}
}
$cmdline = escapeshellarg($cmdline);
if ($this->min_memory_reached()) {
return;
}