Very Very weird, but TRUE !

To recreate the problem, install the Mollom module, log back in as any user except uid=1, edit a node with Office Hours, and try to save the node.
In the Drupal message area you get You get 14 iterations of:

warning: preg_match() expects parameter 2 to be string, array given in /home/register/www/includes/bootstrap.inc on line 771.

followed by:

We're sorry, but the spam filter thinks your submission could be spam. Please complete the CAPTCHA.

if you backtrace the error in bootstrap, you'll see that office_hours.theme.inc, line 18 says:

      $endhrs = _office_hours_mil_to_tf(check_plain($item['endhours']));

As we would expect, this would be passing a string, as check_plain expects.

However, if you var_dump($text) in bootstrap.inc line 771 (which is a UTF8 something or other, called from check_plain), you see that it is getting an array of 3 items, i.e. hours, mins, and ampm...

hmmm... don't have a clue how this could happen...

I suppose it could be a bug in Molloim, or check_plain, or bootstrap, etc,, but this problem only seems to occur with office_hours..

ideas ?

Comments

johnv’s picture

Status: Active » Closed (won't fix)

The D6 support is very minimal. So changes are minimal that this will be fixed.