From 08c43f1ffe7ed4930f1179aea5884db120d447f3 Mon Sep 17 00:00:00 2001 From: Ghislain Loas <ghislo@sandbox.pergame.net> Date: Wed, 2 Dec 2015 12:41:23 +0100 Subject: [PATCH] fix php 5.4 compatibility --- library/Class/Article.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/Class/Article.php b/library/Class/Article.php index 2d005822235..24a4f38f98f 100644 --- a/library/Class/Article.php +++ b/library/Class/Article.php @@ -442,7 +442,8 @@ class ArticleLoader extends Storm_Model_Loader { $day_num = gmdate("w", $day); return array_filter($articles, function($event) { - if(empty($event->getPickDayAsArray()) || in_array($day_num, $event->getPickDayAsArray())) + $pick_day_as_array = $event->getPickDayAsArray(); + if(empty($pick_day_as_array) || in_array($day_num, $pick_day_as_array)) return $event; }); } -- GitLab