These warnings appeared after an anonymous user asked a question:
•Warning: array_values() expects parameter 1 to be array, string given in _field_filter_items() (line 527 of /var/www/html/drupal_test/modules/field/field.module).
•Warning: Invalid argument supplied for foreach() in text_field_validate() (line 119 of /var/www/html/drupal_test/modules/field/modules/text/text.module).
•Deprecated function: Function eregi() is deprecated in faq_ask_form_validate() (line 339 of /var/www/html/drupal_test/sites/all/modules/faq_ask/faq_ask.module).
Using:
Frequently Asked Questions 7.x-1.0-rc2+2-dev (2012-Mar-09)
FAQ_Ask 7.x-1.x-dev (2012-Mar-16)
Drupal core 7.12
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | ask_faq.1554876.patch | 1.86 KB | reswild |
Comments
Comment #1
reswild commentedThe two first warnings are because the code for hiding the body field and filling it with a default text hasn't been updated to match the new Drupal 7 body field.
I'm enclosing a patch for this. I couldn't find out how to set the default text, so the body field is still left empty, but at least the warnings should disappear.
I've also replaced the ereg function for validating email addresses with preg_match, to get rid of the deprecate warning.
Comment #2
Ole Martin commentedmisunderstood
Comment #3
stenjo commentedThank you reswild.
Patch applied to D7-1.x-dev
Comment #4
jlea9378 commentedI tested the new dev and didn't get any warnings this time. Looks good!
Anonymous users are still being directed to the unpublished new post though when they submit a new question, so they receive an access denied error. I created a separate ticket for this issue: #1554912: Access Denied for Anonymous
Comment #5
stenjo commentedCool. I'll close this one then