Auth: Protect User::setDomain() from empty strings

This commit is contained in:
Eric Lippmann 2017-07-11 16:56:35 +02:00
parent b397b01966
commit d05a262819
1 changed files with 5 additions and 1 deletions

View File

@ -379,7 +379,11 @@ class User
*/
public function setDomain($domain)
{
$this->domain = $domain;
$domain = trim($domain);
if (strlen($domain)) {
$this->domain = $domain;
}
return $this;
}