From e18bfd292a2dfd3694fe0928aa671686731bf3dd Mon Sep 17 00:00:00 2001 From: David Jardin Date: Fri, 31 Jan 2025 18:14:03 +0100 Subject: [PATCH] [5.2] Fix namespace map creation on PHP 8.4 (#44789) --- libraries/namespacemap.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/namespacemap.php b/libraries/namespacemap.php index 9cb31ae86c345..39ec5df367c31 100644 --- a/libraries/namespacemap.php +++ b/libraries/namespacemap.php @@ -144,8 +144,11 @@ protected function writeNamespaceFile($elements) */ $error_reporting = error_reporting(0); + // Convert array of lines to string + $content = implode("\n", $content); + try { - File::write($this->file, implode("\n", $content)); + File::write($this->file, $content); } catch (Exception $e) { Log::add('Could not save ' . $this->file, Log::WARNING);