Fix: Handle empty string as tool field value

Signed-off-by: Sebastian Fey <info@sebastianfey.de>
This commit is contained in:
Sebastian Fey 2023-10-29 14:37:27 +01:00
Родитель bddf2a67fe
Коммит c435f808ed
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -49,7 +49,10 @@ class FixToolsFilter extends AbstractJSONFilter {
if (!is_array($json[self::TOOLS])) { if (!is_array($json[self::TOOLS])) {
$t = trim($json[self::TOOLS]); $t = trim($json[self::TOOLS]);
$tools[] = $this->textCleaner->cleanUp($t, false); $t = $this->textCleaner->cleanUp($t, false);
if($t != "") {
$tools[] = $t;
}
} else { } else {
$tools = array_map(function ($t) { $tools = array_map(function ($t) {
$t = trim($t); $t = trim($t);