From 85422fd0ae67fa5f169d68adbce81f0d9c9d720f Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 27 Sep 2019 17:11:18 +0200 Subject: [PATCH] Fix reading enum values from database table column data --- .../table/column/AbstractDatabaseTableColumn.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/database/table/column/AbstractDatabaseTableColumn.class.php b/wcfsetup/install/files/lib/system/database/table/column/AbstractDatabaseTableColumn.class.php index eb489c9b71..379b661bad 100644 --- a/wcfsetup/install/files/lib/system/database/table/column/AbstractDatabaseTableColumn.class.php +++ b/wcfsetup/install/files/lib/system/database/table/column/AbstractDatabaseTableColumn.class.php @@ -173,8 +173,8 @@ abstract class AbstractDatabaseTableColumn implements IDatabaseTableColumn { $column->decimals($data['decimals'] ?: null); } - if ($column instanceof IEnumDatabaseTableColumn) { - $values = explode(',', $data['enumValues'] ?? []); + if ($column instanceof IEnumDatabaseTableColumn && !empty($data['enumValues'])) { + $values = explode(',', $data['enumValues'] ?? ''); $values = array_map(function($value) { // trim one leading and one trailing `'` -- 2.20.1