File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -51,14 +51,17 @@ public static function getName() {
5151 }
5252
5353 public function prepareQuestionInputForSave ($ input ) {
54- if (isset ($ input ['description ' ]) && empty ($ input ['description ' ])) {
55- Session::addMessageAfterRedirect (
56- __ ('A description field should have a description: ' , 'formcreator ' ) . ' ' . $ input ['name ' ],
57- false ,
58- ERROR );
59- return [];
54+ if (isset ($ input ['description ' ])) {
55+ if (strlen ($ input ['description ' ]) < 1 ) {
56+ Session::addMessageAfterRedirect (
57+ __ ('A description field should have a description: ' , 'formcreator ' ) . ' ' . $ input ['name ' ],
58+ false ,
59+ ERROR );
60+ return [];
61+ }
62+ $ input ['description ' ] = addslashes ($ input ['description ' ]);
6063 }
61- $ input [ ' description ' ] = addslashes ( $ input [ ' description ' ]);
64+
6265 return $ input ;
6366 }
6467
You can’t perform that action at this time.
0 commit comments