Skip to content

Commit

Permalink
fix CascasdeSelect functionality
Browse files Browse the repository at this point in the history
the current versions of CascadeSelect return an array for the column definitions instead of a string. This causes htmlspechialchars to crash, which is called when constructing html fpr the form output. 
This fix chacks, if the definition is an array and sets the textinput to the name of the column and the default set in "(...)".
If the old version of CascadeSelect is used, the fix stay with the old behaviour.
  • Loading branch information
ingoj authored Jan 26, 2023
1 parent f94e00c commit 5d9a761
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/UDFCheck/UDFCheckFormGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ protected function initForm() {
$check_radio->addOption($check_radio_text);

foreach ($select_gui->getColumnDefinition() as $key => $name) {
if (is_array($name)) {
$name=$name["name"]." ( ".$name["default"]." ) ";
}
$text_gui = new ilTextInputGUI($name, self::F_CHECK_VALUE_MUL . $key);
$check_radio_text->addSubItem($text_gui);
}
Expand Down

0 comments on commit 5d9a761

Please sign in to comment.