Meilleur test pour la connection à la bdd suite à commentaire, issue #0000533
This commit is contained in:
parent
168bd5d124
commit
d04f178d86
@ -2581,12 +2581,12 @@ class Entreprise extends WsScore
|
||||
$error = new StatusReturn();
|
||||
//Test connexion à la base de données
|
||||
$db = new WDB('jo');
|
||||
if ($db === false) {
|
||||
$error->statusCode = 9000;
|
||||
$error->statusMsg = $this->listError['9000'];
|
||||
} else {
|
||||
if (!is_object($db)) {
|
||||
$error->statusCode = 3000;
|
||||
$error->statusMsg = $this->listError['3000'];
|
||||
} else {
|
||||
$error->statusCode = 9000;
|
||||
$error->statusMsg = $this->listError['9000'];
|
||||
}
|
||||
return $error;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user