From 8e1af22db84bed02a160a0cb30a2efe010230a5b Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 23 Jul 2017 02:11:52 +0200 Subject: [PATCH] test#4 --- build/api/module/machineDefault.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/api/module/machineDefault.php b/build/api/module/machineDefault.php index bc8b7f1..be17c97 100755 --- a/build/api/module/machineDefault.php +++ b/build/api/module/machineDefault.php @@ -684,14 +684,14 @@ /* (3) Mise à jour de l'identité de la machine (ap-ip) */ $updateNetId = new Repo('machine/updateNetworkIdentity', [ $_SESSION['WAREHOUSE']['id'], - $id_machine, + $_SESSION['SATS']['id'], $fetched['identity']['ap'], $fetched['identity']['ip'] ]); /* (2) On gère l'erreur */ - if( !$updateNetId->answer() ) - return [ 'error' => new Error(Err::RepoError), 'details' => $updatedNetId->answer() ]; + if( $updateNetId->error->get() != Err::Success || !$updateNetId->answer() ) + return [ 'error' => new Error(Err::RepoError), 'details' => $updateNetId->answer() ]; /* [3] Gestion des données à envoyer