The expression $email of type string|null is loosely compared to true; this is ambiguous if the string can be empty. You might want to explicitly use !== null instead.
In PHP, under loose comparison (like ==, or !=, or switch conditions),
values of different types might be equal.
For string values, the empty string '' is a special case, in particular
the following results might be unexpected:
''==false// true''==null// true'ab'==false// false'ab'==null// false// It is often better to use strict comparison''===false// false''===null// false
Loading history...
27
$this->setEmail($email);
28
}
29
}
30
31
/**
32
* Sets the email address for the condition.
33
*
34
* @param string $email
35
*/
36
public function setEmail($email)
37
{
38
$this->email = $email;
39
}
40
41
/**
42
* Converts the condition to a string that can be sent to the IMAP server.
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: