mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Return HTTP 400 when operation is not found (instead of 404 page not found)
This commit is contained in:
@@ -174,7 +174,7 @@ abstract class Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->DisplayPageNotFound();
|
||||
$this->DisplayBadRequest();
|
||||
}
|
||||
}
|
||||
catch (Exception $e)
|
||||
@@ -219,6 +219,15 @@ abstract class Controller
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Overridable "page not found" which is more an "operation not found"
|
||||
*/
|
||||
public function DisplayBadRequest()
|
||||
{
|
||||
http_response_code(400);
|
||||
die('Operation not found');
|
||||
}
|
||||
|
||||
/**
|
||||
* Overridable "page not found" which is more an "operation not found"
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user