From c3e1a5d4d60ba5a1e0e5e13d62ca750a2e45e92d Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 13 Oct 2017 18:43:52 +0200 Subject: [PATCH] Fixed fetchDefault::motheure_simple code --- build/api/module/fetchDefault.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build/api/module/fetchDefault.php b/build/api/module/fetchDefault.php index 6488ef6..c5b976b 100644 --- a/build/api/module/fetchDefault.php +++ b/build/api/module/fetchDefault.php @@ -152,10 +152,14 @@ 'count' => $total ]); - // {2} Process + get response // + /* (2) Process + get response */ $upd_res = $upd_req->dispatch(); - /* (3) Retourne le nombre d'entrées enregistrées */ + /* (3) Manage error */ + if( $upd_res->error->get() != Err::Success ) + return ['error' => $upd_res->error]; + + /* (4) Retourne le nombre d'entrées enregistrées */ return [ 'saved' => $count ]; }