From 0223e4f63d72e9a49c38fe308e98ee76c2232536 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 21 Feb 2017 09:28:36 +0100 Subject: [PATCH] minmod --- build/api/module/machineDefault.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build/api/module/machineDefault.php b/build/api/module/machineDefault.php index 304c024..056c971 100755 --- a/build/api/module/machineDefault.php +++ b/build/api/module/machineDefault.php @@ -650,9 +650,10 @@ /* [0] Vérification du token =========================================================*/ $checkToken = new Repo('machine/checkToken', [ $_SESSION['WAREHOUSE']['id'], $token, $renew ]); + $machine = $checkToken->answer(); // Si token incorrect, on envoie une erreur - if( !$checkToken->answer() ) + if( $machine === false ) return [ 'error' => new Error(Err::TokenError) ]; @@ -697,7 +698,7 @@ =========================================================*/ /* (1) Basic working data update ---------------------------------------------------------*/ - $basis_update = self::getMachineWorkingInformation($id_machine); + $basis_update = self::getMachineWorkingInformation($machine['id_machine']);