зеркало из https://github.com/nextcloud/cookbook.git
Fix: Handle empty string as tool field value
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
This commit is contained in:
Родитель
bddf2a67fe
Коммит
c435f808ed
|
@ -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);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче