Commit a7dce8ed by Frédéric

Fix date when not array of array

parent 7a3e8248
...@@ -11,12 +11,15 @@ class FullOpeningWithDaysFilter ...@@ -11,12 +11,15 @@ class FullOpeningWithDaysFilter
public static function run($input) public static function run($input)
{ {
$data = []; $data = [];
$item = $input;
if(empty($input[0]) || !is_array($input[0])) { if(empty($input[0])) {
return $input; return $input;
} }
$item = $input[0]; if(is_array($input[0])) {
$item = $input[0];
}
$data['open'] = (!empty($item[0])) ? 'Ouverture du ' .$item[0] . ' au ' .$item[1] : ''; $data['open'] = (!empty($item[0])) ? 'Ouverture du ' .$item[0] . ' au ' .$item[1] : '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment