diff --git a/core/class/mqtt2.class.php b/core/class/mqtt2.class.php index ff7eb2b..0a0e30f 100644 --- a/core/class/mqtt2.class.php +++ b/core/class/mqtt2.class.php @@ -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; }