Multiline text field notice/typo
greggles - August 8, 2008 - 16:16
| Project: | Content Construction Kit (CCK) |
| Version: | 6.x-2.x-dev |
| Component: | text.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
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.
| Attachment | Size |
|---|---|
| text_count_typo.patch | 937 bytes |

#1
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 ?
#2
Thanks, yched.
If you need more info from me please let me know and I'll be happy to provide it.
#3
Automatically closed -- issue fixed for two weeks with no activity.