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.

CommentFileSizeAuthor
#3 314527-htmlbox-D6.patch1.43 KBdave reid
htmlbox.patch885 bytesemmajane

Comments

emmajane’s picture

Status: Active » Needs review

patch attached, updating the status

dave reid’s picture

Status: Needs review » Reviewed & tested by the community

Looks good and fixed notices on my install.

dave reid’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.43 KB

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.

Poetro’s picture

Status: Needs review » Fixed

Fixed in 6.x-1.0.

Status: Fixed » Closed (fixed)

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