"Cannot use a scalar value as an array" error I'm getting a bunch of PHP errors every time the cron runs. I can't seem to track down what is causing them all.


  Cannot use a scalar value as an array in drupal_render() (line 5822 of /var/www/vhosts/tlthost.net/httpdocs/includes/common.inc).
  
  Cannot use a scalar value as an array in drupal_render() (line 5767 of /var/www/vhosts/tlthost.net/httpdocs/includes/common.inc).
  
  Invalid argument supplied for foreach() in element_children() (line 6300 of
  /var/www/vhosts/tlthost.net/httpdocs/includes/common.inc).
  
  Cannot use a scalar value as an array in adaptivetheme_page_alter() (line 235 of
  /var/www/vhosts/tlthost.net/httpdocs/sites/all/themes/at_core/inc/alter.inc
  
  Cannot use a scalar value as an array in user_relationships_ui_page_alter() (line 247 of
  /var/www/vhosts/tlthost.net/httpdocs/sites/tlt/modules/user_relationships/user_relationships_ui/user_relationships_ui.module).
  
  Cannot use a scalar value as an array in fbconnect_page_alter() (line 568 of
  /var/www/vhosts/tlthost.net/httpdocs/sites/all/modules/fbconnect/fbconnect.module).
  
  Cannot use a scalar value as an array in block_page_build() (line 269 of
  /var/www/vhosts/tlthost.net/httpdocs/modules/block/block.module).


I'm hoping you know what's causing this one. it might help me figure out the rest of the errors.
Sometimes these error messages come up on my sites if cron is run while the site is in maintenance mode. I'm guessing the maintenance mode template for our site has something to do with it, but it could be a variety of things.

When cron runs, it is still running through Drupal's theme system, so you probably have something awry in either your theme or one of your custom modules. Does this happen every time cron runs, or just sometimes?

A final troubleshooting step would be to install elysia_cron and run each cron task individually to see which one might be causing all these errors.

See also: Warning: Cannot use a scalar value as an array