From fb2887916e7f801a822de120b5cdbe3fce70c440 Mon Sep 17 00:00:00 2001 From: Thomas Zilio Date: Wed, 31 Oct 2018 17:46:59 +0100 Subject: [PATCH] Fix categorie allegati --- lib/util.php | 4 ++-- src/HTMLBuilder/Manager/FileManager.php | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/util.php b/lib/util.php index 767df2828..c483db626 100644 --- a/lib/util.php +++ b/lib/util.php @@ -39,9 +39,9 @@ if (!function_exists('array_clean')) { */ function array_clean($array) { - return array_filter($array, function ($value) { + return array_values(array_filter($array, function ($value) { return !empty($value); - }); + })); } } diff --git a/src/HTMLBuilder/Manager/FileManager.php b/src/HTMLBuilder/Manager/FileManager.php index fb2ea7e70..bf493d66b 100644 --- a/src/HTMLBuilder/Manager/FileManager.php +++ b/src/HTMLBuilder/Manager/FileManager.php @@ -183,13 +183,15 @@ class FileManager implements ManagerInterface '; } + $source = array_clean(array_column($categories, 'category')); + $result .= '