correctly check intl extension

This commit is contained in:
Frédéric FRANCE 2018-11-14 22:42:09 +01:00
parent e544f47a05
commit b13ad8170f
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1

View File

@ -13,10 +13,10 @@ class SpoofCheckValidation implements EmailValidation
* @var InvalidEmail
*/
private $error;
public function __construct()
{
if (!class_exists(Spoofchecker::class)) {
if (!extension_loaded('intl')) {
throw new \LogicException(sprintf('The %s class requires the Intl extension.', __CLASS__));
}
}