WCF::getDB()->getEditor()->addColumn('wcf'.WCF_N.'_user_option_value', 'userOption'.$userOption->optionID, self::getColumnDefinition($parameters['optionType']));
// add the default value to this column
- if (isset($parameters['defaultValue'])) {
+ if (isset($parameters['defaultValue']) && $parameters['defaultValue'] !== null) {
$sql = "UPDATE wcf".WCF_N."_user_option_value
SET userOption".$userOption->optionID." = ?";
$statement = WCF::getDB()->prepareStatement($sql);
*/
protected function saveOption($option, $categoryName, $existingOptionID = 0) {
// default values
- $optionName = $optionType = $defaultValue = $validationPattern = $outputClass = $selectOptions = $enableOptions = $permissions = $options = '';
+ $optionName = $optionType = $validationPattern = $outputClass = $selectOptions = $enableOptions = $permissions = $options = '';
$required = $editable = $visible = $searchable = $disabled = $askDuringRegistration = 0;
- $showOrder = null;
+ $defaultValue = $showOrder = null;
// get values
if (isset($option['name'])) $optionName = $option['name'];