From 7880651c5da049b28a9587598dcfb190a3e5ba6c Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 8 Nov 2016 10:32:02 +0100 Subject: [PATCH] fix code escape error in ModuleRequest --- build/api/core/ModuleRequest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build/api/core/ModuleRequest.php b/build/api/core/ModuleRequest.php index 6398579..c64b2bf 100755 --- a/build/api/core/ModuleRequest.php +++ b/build/api/core/ModuleRequest.php @@ -126,7 +126,6 @@ /* [2] On verifie que la methode est amorcable =========================================================*/ if( !is_callable($this->getFunctionCaller()) ){ - var_dump($this->getFunctionCaller()); $this->error = Error::UncallableMethod; return new ModuleResponse($this->error); } @@ -379,8 +378,10 @@ $granted = Authentification::permission($this->path['module'], $method['permissions']); /* (1) On retourne FAUX si aucun droit n'a ete trouve */ - if( $granted !== Error::Success ) - $this->error = Error::PermissionError; + if( $granted !== Error::Success ){ + $this->error = $granted; + return false; + } /* [3] On retourne VRAI si la permission est ok