close #56 fixed PHP bug

This commit is contained in:
Exodus4D
2015-10-26 21:19:39 +01:00
parent f0de974f58
commit b2690587a8

View File

@@ -282,8 +282,9 @@ class Controller {
public function showError($f3){
// set HTTP status
if(!empty($f3->get('ERROR.code'))){
$f3->status($f3->get('ERROR.code'));
$errorCode = $f3->get('ERROR.code');
if(!empty($errorCode)){
$f3->status($errorCode);
}
if($f3->get('AJAX')){
@@ -293,7 +294,7 @@ class Controller {
$return = (object) [];
$error = (object) [];
$error->type = 'error';
$error->code = $f3->get('ERROR.code');
$error->code = $errorCode;
$error->status = $f3->get('ERROR.status');
$error->message = $f3->get('ERROR.text');