mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2024-11-27 06:38:40 -05:00
fix PHP8 fatals
This commit is contained in:
parent
7601038f6b
commit
8845ad65f0
@ -60,6 +60,11 @@ class Notification
|
||||
$sql = "SELECT DISTINCT subscriberIDFK FROM services_subscriber WHERE serviceIDFK IN (" . $this->serviceids . ")";
|
||||
$query = $mysqli->query($sql);
|
||||
|
||||
if (0 === $query->num_rows) {
|
||||
// skip processing if no one needs to be notified
|
||||
return;
|
||||
}
|
||||
|
||||
// Create the queue tasks for email/telegram notifications
|
||||
$queue = new Queue();
|
||||
$queue->status = $queue->all_status['populating'];
|
||||
|
@ -114,7 +114,7 @@ class Queue
|
||||
}
|
||||
|
||||
// TODO: Fix max attempts for notifications
|
||||
public function process_queue(){
|
||||
public static function process_queue(){
|
||||
global $mysqli;
|
||||
$stmt = $mysqli->query("SELECT qn.id, qn.task_id, qn.status, qn.subscriber_id, qn.retries, sub.firstname, sub.userID, sub.token FROM queue_notify AS qn INNER JOIN subscribers AS sub ON qn.subscriber_id = sub.subscriberID WHERE qn.status NOT LIKE 2 AND sub.active=1");
|
||||
while ( $result = $stmt->fetch_assoc() ) {
|
||||
|
@ -153,7 +153,7 @@ class ServiceGroup
|
||||
* Get list of services groups.
|
||||
* @return array $groups
|
||||
*/
|
||||
public function get_groups() {
|
||||
public static function get_groups() {
|
||||
global $mysqli;
|
||||
$stmt = $mysqli->query("SELECT id, name FROM services_groups ORDER by name ASC");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user