Refactor MailChecker to avoid static instance.

This commit is contained in:
Benoît Burnichon
2015-03-06 15:51:42 +01:00
parent b44fb7ed76
commit e84061924b
4 changed files with 53 additions and 19 deletions

View File

@@ -39,8 +39,8 @@ class Setup_Upgrade
$this->app = $app;
if (version_compare($this->app['phraseanet.appbox']->get_version(), '3.9', '<')
&& count(MailChecker::getWrongEmailUsers($app)) > 0) {
$checker = new MailChecker($app['phraseanet.appbox']);
if ($checker->hasWrongEmailUsers()) {
throw new \Exception_Setup_FixBadEmailAddresses('Please fix the database before starting');
}