From f42627c89f68a6554da57042ee95dac30bbce0a0 Mon Sep 17 00:00:00 2001 From: Raivo Hool Date: Sun, 13 Feb 2022 01:45:25 +1300 Subject: [PATCH] Fix iSchedule configuration with PHP 8 Closes #252. --- inc/iSchedule.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/iSchedule.php b/inc/iSchedule.php index 01decea8..1adf432f 100644 --- a/inc/iSchedule.php +++ b/inc/iSchedule.php @@ -211,7 +211,10 @@ class iSchedule while ( count ( $parts ) >= $len ) { $r = dns_get_record ( '_ischedules._tcp.' . implode ( '.', $parts ) , DNS_SRV ); - if ( 0 < count ( $r ) ) + if ($r == false) + { + $r = Array(); + } { $remote_server = $r [ 0 ] [ 'target' ]; $remote_port = $r [ 0 ] [ 'port' ];