Fix iSchedule configuration with PHP 8

Closes #252.
This commit is contained in:
Raivo Hool 2022-02-13 01:45:25 +13:00 committed by Andrew Ruthven
parent 8f5a1d2bcc
commit f42627c89f

View File

@ -211,7 +211,10 @@ class iSchedule
while ( count ( $parts ) >= $len ) while ( count ( $parts ) >= $len )
{ {
$r = dns_get_record ( '_ischedules._tcp.' . implode ( '.', $parts ) , DNS_SRV ); $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_server = $r [ 0 ] [ 'target' ];
$remote_port = $r [ 0 ] [ 'port' ]; $remote_port = $r [ 0 ] [ 'port' ];