Only send error in production or staging

This commit is contained in:
Michael RICOIS 2014-03-27 13:47:20 +00:00
parent e468efba37
commit 8f175b2605

View File

@ -3155,12 +3155,15 @@ class WsScores
$message.= "Requete :\n ".$requete."\n";
$message.= "Reponse :\n ".$reponse."\n";
$c = Zend_Registry::get('config');
$mail = new Scores_Mail();
$mail->setSubject('[ERREUR SOAP] - '.$c->profil->server->name.' -'.date('Ymd'));
$mail->setBodyTexte($message);
$mail->setFrom('supportdev');
$mail->addToKey('supportdev');
$mail->send();
if (APPLICATION_ENV == 'production' || APPLICATION_ENV == 'staging') {
$c = Zend_Registry::get('config');
$mail = new Scores_Mail();
$mail->setSubject('[ERREUR SOAP] - '.$c->profil->server->name.' -'.date('Ymd'));
$mail->setBodyTexte($message);
$mail->setFrom('supportdev');
$mail->addToKey('supportdev');
$mail->send();
}
}
}