File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -402,7 +402,7 @@ private function checkBeforeSave($input) : array {
402402 * @return array the modified $input array
403403 */
404404 public function prepareInputForAdd ($ input ) {
405- if (!empty ($ input ['default_values ' ])) {
405+ if (!in_array ($ input ['fieldtype ' ], [ ' checkboxes ' , ' multiselect ' ])) {
406406 $ input ['default_values ' ] = str_replace ('\r\n ' , '' , $ input ['default_values ' ]);
407407 }
408408
@@ -456,7 +456,7 @@ public function prepareInputForAdd($input) {
456456 public function prepareInputForUpdate ($ input ) {
457457 // global $DB;
458458
459- if (!empty ($ input ['default_values ' ])) {
459+ if (!in_array ($ input ['fieldtype ' ], [ ' checkboxes ' , ' multiselect ' ])) {
460460 $ input ['default_values ' ] = str_replace ('\r\n ' , '' , $ input ['default_values ' ]);
461461 }
462462 if (!$ this ->skipChecks ) {
You can’t perform that action at this time.
0 commit comments