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
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) {
}
}
- $cmdline = escapeshellarg($cmdline);
-
if ($this->min_memory_reached()) {
return;
}