diff options
Diffstat (limited to 'system/core')
-rw-r--r-- | system/core/CodeIgniter.php | 2 | ||||
-rw-r--r-- | system/core/Output.php | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 1f626729a..704539ef4 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -383,7 +383,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * ReflectionMethod::isConstructor() is the ONLY reliable check, * knowing which method will be executed as a constructor. */ - elseif ( ! is_callable(array($class, $method))) + else { $reflection = new ReflectionMethod($class, $method); if ( ! $reflection->isPublic() OR $reflection->isConstructor()) diff --git a/system/core/Output.php b/system/core/Output.php index 02c6d151b..bbad9f168 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -299,14 +299,14 @@ class CI_Output { */ public function get_header($header) { - // Combine headers already sent with our batched headers - $headers = array(); - foreach ($this->headers as $value) + // We only need [x][0] from our multi-dimensional array + $header_lines = array_map(function ($headers) { - $headers[] = $value[0]; - } + return array_shift($headers); + }, $this->headers); + $headers = array_merge( - $headers, + $header_lines, headers_list() ); |