Project:HTMLBox
Version:6.x-1.0-beta5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

On a fresh install of htmlbox on a brand new Drupal 6.4 site (only core modules installed), I get the following error when I install htmlbox. This error appears on the modules page after clicking, "save configuration."
* notice: Undefined index: any in /path/to/drupal/sites/all/modules/htmlbox/htmlbox.module on line 305.
* notice: Undefined variable: buttons in /path/to/drupal/sites/all/modules/htmlbox/htmlbox.module on line 393.

On the page /?q=admin/settings/htmlbox the following errors appear:
* notice: Undefined index: any in /path/to/drupal/sites/all/modules/htmlbox/htmlbox.module on line 305.

Please change the following:
line 305: add isset() around $other_forms['any']
line 393: change $buttons to 'buttons'

Patch attached.

AttachmentSize
htmlbox.patch885 bytes

Comments

#1

Status:active» needs review

patch attached, updating the status

#2

Status:needs review» reviewed & tested by the community

Looks good and fixed notices on my install.

#3

Status:reviewed & tested by the community» needs review

Actually, we probably want to use !empty() instead of isset() since we want to check that its a true value (unchecked it would be 'any' => 0, so it would still pass isset()).

Revised patch that also fixes all the Notice: Undefined index: #post in form_builder() (line 897 of /home/dave/Projects/www/drupal6dev/includes/form.inc). PHP notices I get on nearly every form.

AttachmentSize
314527-htmlbox-D6.patch 1.43 KB

#4

Status:needs review» fixed

Fixed in 6.x-1.0.

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.