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

CommentFileSizeAuthor
#1 ask_faq.1554876.patch1.86 KBreswild

Comments

reswild’s picture

StatusFileSize
new1.86 KB

The 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.

Ole Martin’s picture

misunderstood

stenjo’s picture

Assigned: Unassigned » stenjo
Status: Active » Needs review

Thank you reswild.
Patch applied to D7-1.x-dev

jlea9378’s picture

I 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

stenjo’s picture

Status: Needs review » Fixed

Cool. I'll close this one then

Status: Fixed » Closed (fixed)

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