@@ -228,7 +228,7 @@ public function questionsObject(): void
228228 $ ilToolbar ->setFormAction ($ this ->ctrl ->getFormAction ($ this ));
229229 $ types = new ilSelectInputGUI ($ this ->lng ->txt ("create_new " ), "sel_question_types " );
230230 $ types ->setOptions ($ qtypes );
231- $ ilToolbar ->addStickyItem ($ types , "" );
231+ $ ilToolbar ->addStickyItem ($ types , false );
232232
233233 $ this ->gui ->button (
234234 $ this ->lng ->txt ("svy_create_question " ),
@@ -422,7 +422,7 @@ protected function insertQuestions(
422422 }
423423 }
424424 if (!$ insert_id && preg_match ("/^cb_qb_(\d+)$/ " , $ target , $ matches )) {
425- $ ids = $ this ->object ->getQuestionblockQuestionIds ($ matches [1 ]);
425+ $ ids = $ this ->object ->getQuestionblockQuestionIds (( int ) $ matches [1 ]);
426426 if (count ($ ids )) {
427427 if ($ insert_mode === 0 ) {
428428 $ insert_id = $ ids [0 ];
@@ -695,7 +695,7 @@ public function changeDatatypeObject(): void
695695 {
696696 $ ilUser = $ this ->user ;
697697
698- $ ilUser ->writePref ('svy_insert_type ' , $ this ->request ->getDataType ());
698+ $ ilUser ->writePref ('svy_insert_type ' , ( string ) $ this ->request ->getDataType ());
699699
700700 switch ($ this ->request ->getDataType ()) {
701701 case 2 :
@@ -897,7 +897,7 @@ protected function initQuestionblockForm(
897897 if ($ a_question_ids ) {
898898 foreach ($ a_question_ids as $ q_id ) {
899899 $ hidden = new ilHiddenInputGUI ("qids[] " );
900- $ hidden ->setValue ($ q_id );
900+ $ hidden ->setValue (( string ) $ q_id );
901901 $ form ->addItem ($ hidden );
902902 }
903903 }
@@ -919,9 +919,9 @@ public function saveDefineQuestionblockObject(): void
919919 $ form = $ this ->initQuestionblockForm ($ block_id );
920920 if ($ form ->checkInput ()) {
921921 $ title = $ form ->getInput ("title " );
922- $ show_questiontext = $ form ->getInput ("show_questiontext " );
923- $ show_blocktitle = $ form ->getInput ("show_blocktitle " ) ;
924- $ compress_view = $ form ->getInput ("compress_view " ) ;
922+ $ show_questiontext = ( bool ) $ form ->getInput ("show_questiontext " );
923+ $ show_blocktitle = ( bool ) $ form ->getInput ("show_blocktitle " );
924+ $ compress_view = ( bool ) $ form ->getInput ("compress_view " );
925925 if ($ block_id ) {
926926 $ this ->object ->modifyQuestionblock (
927927 $ block_id ,
@@ -1034,7 +1034,10 @@ public function saveHeadingObject(): void
10341034 $ form = $ this ->initHeadingForm ($ q_id );
10351035 if ($ form ->checkInput ()) {
10361036 $ heading = $ this ->purifier ->purify ($ form ->getInput ("heading " ));
1037- $ this ->object ->saveHeading ($ heading , $ form ->getInput ("insertbefore " ));
1037+ $ this ->object ->saveHeading (
1038+ $ heading ,
1039+ (int ) $ form ->getInput ("insertbefore " )
1040+ );
10381041 $ this ->ctrl ->redirect ($ this , "questions " );
10391042 }
10401043
0 commit comments