The response helper function must properly set the status code and the headers

This commit is contained in:
Alex Tselegidis 2021-11-05 08:31:37 +01:00
parent 3c5be0d12b
commit 95a4e94a53

View file

@ -66,8 +66,14 @@ if ( ! function_exists('response'))
/** @var EA_Controller $CI */ /** @var EA_Controller $CI */
$CI = &get_instance(); $CI = &get_instance();
foreach ($headers as $header)
{
$CI->output->set_header($header);
}
$CI $CI
->output ->output
->set_status_header($status)
->set_output($content); ->set_output($content);
} }
} }