From af8cbdeed7b43951301e906bf73cabd948a9299a Mon Sep 17 00:00:00 2001 From: sapics Date: Sat, 16 Jan 2021 16:10:19 +0900 Subject: Fix error in core/Output.php for php8.0 Fix error in array_shift array_map('array_shift', $this->headers) causes error as array_shift(): Argument bcit-ci#1 ($array) must be passed by reference, value given --- system/core/Output.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/system/core/Output.php b/system/core/Output.php index c56aff4b0..02c6d151b 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -300,9 +300,13 @@ class CI_Output { public function get_header($header) { // Combine headers already sent with our batched headers + $headers = array(); + foreach ($this->headers as $value) + { + $headers[] = $value[0]; + } $headers = array_merge( - // We only need [x][0] from our multi-dimensional array - array_map('array_shift', $this->headers), + $headers, headers_list() ); -- cgit v1.2.3-24-g4f1b