Make set_status_header() a dummy under CLI
Close #3605
diff --git a/system/core/Common.php b/system/core/Common.php
index 9f50974..7035c18 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -492,6 +492,11 @@
*/
function set_status_header($code = 200, $text = '')
{
+ if (is_cli())
+ {
+ return;
+ }
+
$stati = array(
200 => 'OK',
201 => 'Created',
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 3145e83..a904c82 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -507,7 +507,8 @@
- Changed internal function ``load_class()`` to accept a constructor parameter instead of (previously unused) class name prefix.
- Removed default parameter value of :php:func:`is_php()`.
- Added a second argument ``$double_encode`` to :php:func:`html_escape()`.
- - Changed function ``config_item()`` to return NULL instead of FALSE when no value is found.
+ - Changed function :php:func:`config_item()` to return NULL instead of FALSE when no value is found.
+ - Changed function :php:func:`set_status_header()` to return immediately when run under CLI.
- :doc:`Output Library <libraries/output>` changes include: