summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-10-21 15:30:31 +0200
committerAndrey Andreev <narf@devilix.net>2016-10-21 15:30:31 +0200
commit4ffe6345690f81872d0937e562faaf75f3185b6a (patch)
tree8695ad99bef9308d5d4dab16692ef2f7f5207928
parent6513701f21e72fadbbadc4bfea501dd871fa5149 (diff)
Fix #4865
-rw-r--r--system/core/Common.php1
-rw-r--r--system/core/Exceptions.php1
-rw-r--r--user_guide_src/source/changelog.rst1
3 files changed, 2 insertions, 1 deletions
diff --git a/system/core/Common.php b/system/core/Common.php
index 257763dd3..91c585f7d 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -661,6 +661,7 @@ if ( ! function_exists('_exception_handler'))
$_error =& load_class('Exceptions', 'core');
$_error->log_exception('error', 'Exception: '.$exception->getMessage(), $exception->getFile(), $exception->getLine());
+ is_cli() OR set_status_header(500);
// Should we display the error?
if (str_ireplace(array('off', 'none', 'no', 'false', 'null'), '', ini_get('display_errors')))
{
diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php
index a1c6a1970..4e10f2831 100644
--- a/system/core/Exceptions.php
+++ b/system/core/Exceptions.php
@@ -207,7 +207,6 @@ class CI_Exceptions {
}
else
{
- set_status_header(500);
$templates_path .= 'html'.DIRECTORY_SEPARATOR;
}
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 4d2cad662..1b3820cb0 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -37,6 +37,7 @@ Bug fixes for 3.1.1
- Fixed a bug (#4851) - :doc:`Database Forge <database/forge>` didn't quote schema names passed to its ``create_database()`` method.
- Fixed a bug (#4863) - :doc:`HTML Table Library <libraries/table>` method ``set_caption()`` was missing method chaining support.
- Fixed a bug (#4843) - :doc:`XML-RPC Library <libraries/xmlrpc>` client class didn't set a read/write socket timeout.
+- Fixed a bug (#4865) - uncaught exceptions didn't set the HTTP Response status code to 500 unless ``display_errors`` was turned On.
Version 3.1.0
=============