mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 23:42:17 +00:00
FHCAPI Controller: optional status param for error function
This commit is contained in:
@@ -181,11 +181,12 @@ class FHCAPI_Controller extends Auth_Controller
|
||||
/**
|
||||
* @param array $error
|
||||
* @param string $type (optional)
|
||||
* @param integer $status (optional)
|
||||
* @return void
|
||||
*/
|
||||
protected function terminateWithError($error, $type = null)
|
||||
protected function terminateWithError($error, $type = null, $status = REST_Controller::HTTP_INTERNAL_SERVER_ERROR)
|
||||
{
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
$this->output->set_status_header($status);
|
||||
$this->addError($error, $type);
|
||||
$this->setStatus(self::STATUS_ERROR);
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user