17
Yes, there is a bug in the code.
The $checkbox variable must be unset() before being used a second time. To work properly the code should read:
// options check box
$checkbox_tray = new XoopsFormElementTray(_BL_OPTIONS ,'<br />');
$checkbox = new XoopsFormCheckBox('', 'nohtml', !$entry->doHtml());
$checkbox->addOption('nohtml', _BL_DISABLEHTML);
$checkbox_tray->addElement($checkbox);
unset($checkbox); //destroy first instance
$checkbox = new XoopsFormCheckBox('', 'private', $entry->isPrivate());
$checkbox->addOption('private', _BL_PRIVATE);
$checkbox_tray->addElement($checkbox);
$blog_form->addElement($checkbox_tray);