1
0
mirror of https://github.com/flarum/core.git synced 2025-07-17 06:41:21 +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 b92c8e9079
commit babc1317c5

View File

@@ -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) {