From c545c0147636d8592fdcb7e8ec2c6df09399d485 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 19 Feb 2015 11:36:10 +0200 Subject: Make set_status_header() a dummy under CLI Close #3605 --- system/core/Common.php | 5 +++++ user_guide_src/source/changelog.rst | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/system/core/Common.php b/system/core/Common.php index 9f509745f..7035c18ff 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -492,6 +492,11 @@ if ( ! function_exists('set_status_header')) */ 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 3145e831a..a904c827f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -507,7 +507,8 @@ Release Date: Not Released - 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 ` changes include: -- cgit v1.2.3-24-g4f1b