1
0
mirror of https://github.com/flarum/core.git synced 2025-07-20 08:11:27 +02:00

Filter composer icon array to only valid values (#3080)

This commit is contained in:
Sami Mazouz
2021-09-25 18:35:27 +01:00
committed by GitHub
parent 88724bb4cb
commit 1d15cff9ca

View File

@@ -283,6 +283,14 @@ class Extension implements Arrayable
{ {
$properties = $this->getIcon(); $properties = $this->getIcon();
if (empty($properties)) {
return '';
}
$properties = array_filter($properties, function ($item) {
return is_string($item);
});
unset($properties['name']); unset($properties['name']);
return implode(';', array_map(function (string $property, string $value) { return implode(';', array_map(function (string $property, string $value) {