From fb8c3c2cffd993330fe373e4fb379c48108ef32e Mon Sep 17 00:00:00 2001
From: Daniel Jagszent <daniel@jagszent.de>
Date: Thu, 30 Jun 2016 14:49:28 +0200
Subject: [PATCH] Make `cron` signals conform to documentation.

The [signal documentation]
(https://github.com/osTicket/osTicket/blob/develop/setup/doc/signals.md)
for the `cron` signal states that the context is `null`. But it was
missing until now (and the `$data` parameter was wrongly forwarded as
`$object`)
---
 include/class.cron.php | 2 +-
 scp/autocron.php       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/class.cron.php b/include/class.cron.php
index 94e1af314..e545c5afb 100644
--- a/include/class.cron.php
+++ b/include/class.cron.php
@@ -107,7 +107,7 @@ class Cron {
         self::MaybeOptimizeTables();
 
         $data = array('autocron'=>false);
-        Signal::send('cron', $data);
+        Signal::send('cron', null, $data);
     }
 }
 ?>
diff --git a/scp/autocron.php b/scp/autocron.php
index 989673a22..170ab3a8b 100644
--- a/scp/autocron.php
+++ b/scp/autocron.php
@@ -66,7 +66,7 @@ if($cfg && $cfg->isAutoCronEnabled()) { //ONLY fetch tickets if autocron is enab
 }
 
 $data = array('autocron'=>true);
-Signal::send('cron', $data);
+Signal::send('cron', null, $data);
 
 ob_end_clean();
 ?>
-- 
GitLab