2
0
forked from Wavyzz/dolibarr

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

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__));
}
}