mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:00:16 +00:00
poormancron - proc_run executing twice, once as function; once as commandline
This commit is contained in:
parent
db03b1ab17
commit
96bcaf4331
2 changed files with 9 additions and 4 deletions
|
@ -31,7 +31,9 @@ function poormancron_hook(&$a,&$b) {
|
|||
}
|
||||
}
|
||||
|
||||
function poormancron_procrun(&$a, $argv) {
|
||||
function poormancron_procrun(&$a, &$arr) {
|
||||
$argv = $arr['args'];
|
||||
$arr['run_cmd'] = false;
|
||||
logger("poormancron procrun ".implode(", ",$argv));
|
||||
array_shift($argv);
|
||||
$argc = count($argv);
|
||||
|
|
9
boot.php
9
boot.php
|
@ -7,7 +7,7 @@ require_once('include/text.php');
|
|||
require_once("include/pgettext.php");
|
||||
|
||||
|
||||
define ( 'FRIENDIKA_VERSION', '2.2.1074' );
|
||||
define ( 'FRIENDIKA_VERSION', '2.2.1075' );
|
||||
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
|
||||
define ( 'DB_UPDATE_VERSION', 1079 );
|
||||
|
||||
|
@ -1033,11 +1033,14 @@ function proc_run($cmd){
|
|||
$a = get_app();
|
||||
|
||||
$args = func_get_args();
|
||||
call_hooks("proc_run", $args);
|
||||
$arr = array('args' => $args, 'run_cmd' => true);
|
||||
|
||||
call_hooks("proc_run", $arr);
|
||||
if(! $arr['run_cmd'])
|
||||
return;
|
||||
|
||||
if(count($args) && $args[0] === 'php')
|
||||
$args[0] = ((x($a->config,'php_path')) && (strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
|
||||
|
||||
foreach ($args as $arg){
|
||||
$arg = escapeshellarg($arg);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue