Fix PHP 7.2 warning: count(): Parameter must be an array or an object that implements Countable

pull/6465/head
Aleksander Machniak 6 years ago
parent a4de40566d
commit 78d896d469

@ -889,7 +889,7 @@ function rcmail_email_input_format($mailto, $count=false, $check=true)
else if (preg_match('/<*'.$email_regexp.'>*$/', $item, $matches)) {
$address = $matches[0];
$name = trim(str_replace($address, '', $item));
if ($name[0] == '"' && $name[count($name)-1] == '"') {
if ($name[0] == '"' && $name[strlen($name)-1] == '"') {
$name = substr($name, 1, -1);
}
$name = stripcslashes($name);

Loading…
Cancel
Save