From 6d5024c6713aec08474e5cc1a2207c36b657d110 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 3 Dec 2020 19:42:19 +0100 Subject: [PATCH] *downtimestarthistoryQuery#joinBaseTables(): don't call func_get_arg() with an invalid index ... as PHP 8 doesn't tolerate that. refs #4287 --- .../Backend/Ido/Query/HostdowntimestarthistoryQuery.php | 2 +- .../Backend/Ido/Query/ServicedowntimestarthistoryQuery.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostdowntimestarthistoryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostdowntimestarthistoryQuery.php index 831df6c81..5d0517884 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostdowntimestarthistoryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostdowntimestarthistoryQuery.php @@ -96,7 +96,7 @@ class HostdowntimestarthistoryQuery extends IdoQuery array() ); - if (@func_get_arg(0) === false) { + if (func_num_args() === 0 || func_get_arg(0) === false) { $this->select->where( "hdh.actual_start_time > '1970-01-02 00:00:00'" ); diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicedowntimestarthistoryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicedowntimestarthistoryQuery.php index 6ed081ef7..932d854a0 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicedowntimestarthistoryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicedowntimestarthistoryQuery.php @@ -97,7 +97,7 @@ class ServicedowntimestarthistoryQuery extends IdoQuery array() ); - if (@func_get_arg(0) === false) { + if (func_num_args() === 0 || func_get_arg(0) === false) { $this->select->where( "sdh.actual_start_time > '1970-01-02 00:00:00'" );