X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fcronhooks.php;h=4a852935a051a7522804c96e39a84c26b8fb2444;hb=b78996416ce8c195dfd725c332c7fbddefe08832;hp=a519dee22433650e5839d6e4ed71e53f06dcd408;hpb=0811f9257ef3ee032c9ad307c96a626c76239e2a;p=friendica.git diff --git a/include/cronhooks.php b/include/cronhooks.php index a519dee224..4a852935a0 100644 --- a/include/cronhooks.php +++ b/include/cronhooks.php @@ -1,13 +1,13 @@ hooks) AND array_key_exists("cron", $a->hooks)) { + if (($argc == 2) && is_array($a->hooks) && array_key_exists("cron", $a->hooks)) { foreach ($a->hooks["cron"] as $hook) { if ($hook[1] == $argv[1]) { logger("Calling cron hook '" . $hook[1] . "'", LOGGER_DEBUG); @@ -38,7 +38,7 @@ function cronhooks_run(&$argv, &$argc) { $d = datetime_convert(); - if (is_array($a->hooks) AND array_key_exists("cron", $a->hooks)) { + if (is_array($a->hooks) && array_key_exists("cron", $a->hooks)) { foreach ($a->hooks["cron"] as $hook) { logger("Calling cronhooks for '" . $hook[1] . "'", LOGGER_DEBUG); proc_run(PRIORITY_MEDIUM, "include/cronhooks.php", $hook[1]);