From e9c7477ff0acedf9b49e508e1543395bbcbf7533 Mon Sep 17 00:00:00 2001 From: Yoggzo Date: Sun, 27 Mar 2016 19:24:03 +0200 Subject: Modifications in error management and correct error in Image.php --- server/core/App.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'server/core/App.php') diff --git a/server/core/App.php b/server/core/App.php index 10813bd..48bb9ab 100755 --- a/server/core/App.php +++ b/server/core/App.php @@ -112,15 +112,20 @@ class App{ } public function getPostParam($name){ - - return $this->postParams[$name]; + + if(isset($this->postParams[$name])){ + return $this->postParams[$name]; + }else{ + $this->setOutput("Error", "Missing parameter ".$name); + } } - public function setPostParam($name, $value){ - - $this->postParams[$name]= $value; + + public function setPostParam($param, $value){ + $this->postParams[$param] = $value; + } public function setOutput($key, $out){ -- cgit v1.2.3