I believe that there is a typo in the text module which causes a notice and also causes some sort of filter related bug.

Steps to repeat:
1. Add a multi-line text field to a node
2. Visit the node/add page

Expect results:
No notices

Actual results:
notice: Undefined offset: 1 in /home/.beanor/knaddiso/d6/sites/all/modules/cck/modules/text/text.module on line 450.

Looking at that line, the condition passed to the if statement seemed weird to me. It does a count on an equality test (i.e. a count on a boolean) rather than comparing the count of an array to the number 2.

The attached patch fixes the notice and didn't seem to introduce any bugs.

CommentFileSizeAuthor
text_count_typo.patch937 bytesgreggles

Comments

yched’s picture

Status: Needs review » Fixed

Typo indeed. Fixed.

AAMOF, I don't think I understand why $element['#columns'] wouldn't have the expected columns - like it seems is the case for you.
This conditional was introduced in http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/cck/modules...

Note to Karen : is it normal that text_textfield_process() doesn't have that same check ?

greggles’s picture

Thanks, yched.

If you need more info from me please let me know and I'll be happy to provide it.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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