From babc1317c50c473091ff44ae6af355ccf1df8abb Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Sat, 25 Sep 2021 18:35:27 +0100 Subject: [PATCH] Filter composer icon array to only valid values (#3080) --- framework/core/src/Extension/Extension.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/framework/core/src/Extension/Extension.php b/framework/core/src/Extension/Extension.php index 41e73482a..3398f51b4 100644 --- a/framework/core/src/Extension/Extension.php +++ b/framework/core/src/Extension/Extension.php @@ -283,6 +283,14 @@ class Extension implements Arrayable { $properties = $this->getIcon(); + if (empty($properties)) { + return ''; + } + + $properties = array_filter($properties, function ($item) { + return is_string($item); + }); + unset($properties['name']); return implode(';', array_map(function (string $property, string $value) {