From a58e3dc9bcf2473927a4ec1e106a656b43422021 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 Feb 2019 11:12:02 +0100 Subject: [PATCH] FIX #10711 Try to init the hook at a higher level --- htdocs/cron/class/cronjob.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index eaff511a779..b4289f60f36 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -953,7 +953,9 @@ class Cronjob extends CommonObject function run_jobs($userlogin) { // phpcs:enable - global $langs, $conf; + global $langs, $conf, $hookmanager; + + $hookmanager->initHooks(array('cron')); $now=dol_now(); $error = 0;