Use the correct type

[MAILPOET-2716]
This commit is contained in:
Pavel Dohnal
2020-04-22 11:29:24 +02:00
committed by Veljko V
parent 59c5f2a321
commit 6dcf494e6d

View File

@@ -75,7 +75,7 @@ class ModelValidator extends \MailPoetVendor\Sudzy\Engine {
public function validateNonRoleEmail($email) { public function validateNonRoleEmail($email) {
if (!$this->validateEmail($email)) return false; if (!$this->validateEmail($email)) return false;
$firstPart = strtolower(substr($email, 0, strpos($email, '@'))); $firstPart = strtolower(substr($email, 0, (int)strpos($email, '@')));
return array_search($firstPart, self::ROLE_EMAILS) === false; return array_search($firstPart, self::ROLE_EMAILS) === false;
} }