mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:07 +01:00
fix Mail\Avatar::getLavatar(): Argument #1 ($address) must be of type string, null given
This commit is contained in:
parent
2f4daa5d39
commit
498aebe192
@ -63,8 +63,12 @@ class Avatar
|
|||||||
* - "ralf.becker@egroupware.org" --> dito
|
* - "ralf.becker@egroupware.org" --> dito
|
||||||
* - "rb@egroupware.org" --> ["fname" --> "r", "lname" => "b"]
|
* - "rb@egroupware.org" --> ["fname" --> "r", "lname" => "b"]
|
||||||
*/
|
*/
|
||||||
static function getLavatar(string $address) : array
|
static function getLavatar(string $address=null) : array
|
||||||
{
|
{
|
||||||
|
if (empty($address))
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
if (preg_match("/^\"?'?(.*)'?\"?\s+<([^<>'\"]+)>$/", $address, $matches))
|
if (preg_match("/^\"?'?(.*)'?\"?\s+<([^<>'\"]+)>$/", $address, $matches))
|
||||||
{
|
{
|
||||||
if (($parts = preg_split('/[, ]+/', $matches[1])))
|
if (($parts = preg_split('/[, ]+/', $matches[1])))
|
||||||
|
Loading…
Reference in New Issue
Block a user