From 81bbc1e3d926b079486d8016c5ed61050d4f2026 Mon Sep 17 00:00:00 2001 From: Thor Brink Date: Tue, 28 Jan 2025 09:49:53 +0000 Subject: [PATCH] fix: handle null posts array in AbstractController --- .../php/Module/Posts/TemplateController/AbstractController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/php/Module/Posts/TemplateController/AbstractController.php b/source/php/Module/Posts/TemplateController/AbstractController.php index 255bbf961..6cdd2297a 100644 --- a/source/php/Module/Posts/TemplateController/AbstractController.php +++ b/source/php/Module/Posts/TemplateController/AbstractController.php @@ -96,7 +96,7 @@ public function preparePosts($posts = []) return $post; - }, $posts); + }, $posts ?? []); if(!empty($posts)) { foreach ($posts as $index => &$post) {