Detailed Description:
Hi,
The website page gone white after putting the tag on it.
At first could not find anything.
Later found out that there was a fault in /lib/class.RegField.php what was
triggered because I had only one field in a dropdown.
The field in my dropdown triggerd this fault in the code and gave a error 500
Solution:
Added 'Exception' in the code below (2 places) in /lib/class.RegField.php from
line 77
Current code:
if( $obj->required != 1 && $obj->required != 2 ) throw new
\InvalidArgument('Invalid required value. must be 1 or 2');
switch( $obj->type ) {
case 4: // dropdown
case 5: // multiselect
case 7: // radiobtns
if( !is_array($obj->options) || count($obj->options) < 2 ) throw new
\InvalidArgument('dropdown/radio button fields must have at least 2 options');
break;
}
Fixed:
if( $obj->required != 1 && $obj->required != 2 ) throw new
\InvalidArgumentException('Invalid required value. must be 1 or 2');
switch( $obj->type ) {
case 4: // dropdown
case 5: // multiselect
case 7: // radiobtns
if( !is_array($obj->options) || count($obj->options) < 2 ) throw new
\InvalidArgumentException('dropdown/radio button fields must have at least 2
options');
break;
}