From 74384ca7f88913b87e982696bb5cb3eb5593c451 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 20 Dec 2021 15:47:39 +0200 Subject: Merge pull request #6074 from philsturgeon/ci3-php8 CodeIgniter 3.0 on PHP 8 --- system/core/Output.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'system/core/Output.php') diff --git a/system/core/Output.php b/system/core/Output.php index cef092600..93d85e798 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -299,10 +299,14 @@ class CI_Output { */ public function get_header($header) { - // Combine headers already sent with our batched headers + // We only need [x][0] from our multi-dimensional array + $header_lines = array_map(function ($headers) + { + return array_shift($headers); + }, $this->headers); + $headers = array_merge( - // We only need [x][0] from our multi-dimensional array - array_map('array_shift', $this->headers), + $header_lines, headers_list() ); -- cgit v1.2.3-24-g4f1b From 318c485b7b83356543c9aa7ab65464893d7eb8fe Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 5 Jan 2022 13:57:33 +0200 Subject: Close #6021: Suppress possible E_DEPRECATION notices about mbstring.func_overload --- system/core/Output.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/core/Output.php') diff --git a/system/core/Output.php b/system/core/Output.php index 93d85e798..8e3245b79 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -145,7 +145,7 @@ class CI_Output { && extension_loaded('zlib') ); - isset(self::$func_overload) OR self::$func_overload = (extension_loaded('mbstring') && ini_get('mbstring.func_overload')); + isset(self::$func_overload) OR self::$func_overload = ( ! is_php('8.0') && extension_loaded('mbstring') && @ini_get('mbstring.func_overload')); // Get mime types for later $this->mimes =& get_mimes(); -- cgit v1.2.3-24-g4f1b