From: Matthias Schmidt Date: Fri, 27 Sep 2019 15:11:18 +0000 (+0200) Subject: Fix reading enum values from database table column data X-Git-Tag: 5.2.0_Beta_2~29^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=85422fd0ae67fa5f169d68adbce81f0d9c9d720f;p=GitHub%2FWoltLab%2FWCF.git Fix reading enum values from database table column data --- 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 `'`