From: Michael Date: Tue, 24 Jul 2018 03:42:44 +0000 (+0000) Subject: Issue 5467: Fix worker and daemon X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=de984cdaa1b1fab2d6868297d953fa4741af5cfa;p=friendica.git Issue 5467: Fix worker and daemon --- diff --git a/bin/daemon.php b/bin/daemon.php index bf82912ee2..159b20e159 100755 --- a/bin/daemon.php +++ b/bin/daemon.php @@ -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 diff --git a/src/App.php b/src/App.php index c56d9c10e4..02215d2e69 100644 --- a/src/App.php +++ b/src/App.php @@ -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; }