Skip to content

Commit

Permalink
improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
zoic21 authored Sep 19, 2024
1 parent 62f3162 commit 14fa5e9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/class/mqtt2.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,13 @@ public static function getFormatedInfos() {
$infos['port'] = config::byKey('remote::port', __CLASS__);
$infos['protocol'] = config::byKey('remote::protocol', __CLASS__);
}
$infos['user'] = $authentifications[0];
$infos['password'] = $authentifications[1];
if(count($authentifications) == 2){
$infos['user'] = $authentifications[0];
$infos['password'] = $authentifications[1];
}else{
$infos['user'] = "";
$infos['password'] = "";
}
return $infos;
}

Expand Down

0 comments on commit 14fa5e9

Please sign in to comment.