From 062cbc21a6afc32aa7026f9cd1f688e777af464a Mon Sep 17 00:00:00 2001 From: earnolmartin Date: Thu, 21 Apr 2022 15:47:08 -0600 Subject: [PATCH] PHP 8 Changes --- ehcp/classapp.php | 12 ++++++++---- ehcp/localutils.php | 14 ++++++++------ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ehcp/classapp.php b/ehcp/classapp.php index 67a72e9..cb2b088 100755 --- a/ehcp/classapp.php +++ b/ehcp/classapp.php @@ -11426,7 +11426,7 @@ function dnsNamedConfFile($arr){// for daemon mode $out.=$this->putArrayToStrDns($arr2); # for slave dns, we should use $dnsnamedconftemplate_slave if domain has dnsmaster field set. will code later. $file=$this->conf['namedbase']."/named_ehcp.conf"; echo "\n\nwriting namedfile: $file \n\n"; - $success = writeoutput2($file,$out,w); + $success = writeoutput2($file,$out,"w"); // Fix perms on the bind file $this->fixBindFilePerms($file); @@ -13227,7 +13227,7 @@ function new_sync_domains($file=''){ $multiserver=false; foreach($webservers as $w){ - if($this->get_server_access_ip($w[ip])<>'localhost') { + if($this->get_server_access_ip($w["ip"])<>'localhost') { $multiserver=True; } } @@ -15261,13 +15261,17 @@ if(!isset($baslangic1)) $baslangic1=$baslangic; if(!isset($satirsayisi1) or $satirsayisi1==0) $satirsayisi1=$satirsayisi; if(!isset($baslangic1)) $baslangic1=0; -if(!isset($satirsayisi1) or $satirsayisi1==0) $satirsayisi1=10; +if(!isset($satirsayisi1) or $satirsayisi1==0 or empty($satirsayisi1y)) $satirsayisi1=10; $result2=''; $alansayisi=count($alan); -$alansayisi2=count($linkyazi); +if(is_array($linkyazi)){ + $alansayisi2=count($linkyazi); +}else{ + $alansayisi2 = 0; +} $satirno=0; $ilkfiltre=$filtre; diff --git a/ehcp/localutils.php b/ehcp/localutils.php index 0170117..2c8e0c6 100755 --- a/ehcp/localutils.php +++ b/ehcp/localutils.php @@ -603,12 +603,14 @@ $alansayisi=count($alan); } // Handle extra - for ($i=0;$i"; - }else{ - $result2.=$th . ""; + if(is_array($extra)){ + for ($i=0;$i"; + }else{ + $result2.=$th . ""; + } } }