diff --git a/src/classes/Tools/Hosts/AddHosts.php b/src/classes/Tools/Hosts/AddHosts.php index 824fc332..423db1b5 100644 --- a/src/classes/Tools/Hosts/AddHosts.php +++ b/src/classes/Tools/Hosts/AddHosts.php @@ -61,7 +61,7 @@ public function add($userId, array $hostsDetails) $hostName, $hostsDetail["trustPassword"], // Might end with whitepsace $socketPath, - trim($hostsDetail["token"]) // b64 shouldn't have whitespace + $hostsDetail["token"] !== null ? trim($hostsDetail["token"]) : null // b64 shouldn't have whitespace ); $alias = null;