This warning started appearing on my site all of a sudden. Any idea how to fix it?

warning: array_rand() [function.array-rand]: First argument has to be an array in ../themes/ninesixtyrobots/template.php on line 50.

Thanks!

CommentFileSizeAuthor
#5 twitter-off.png5.99 KBpyrowolf
#3 template.patch665 byteskylehase
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jjeff’s picture

I believe that error comes up when the server cannot contact Twitter.

Quicksketch may have a fix for that, but for the time being, you can simply disable the Twitter functionality from the theme's configuration page.

timhobert’s picture

Interesting. It seems like the Twitter functionality is working fine. For now - just so that users don't see the error - I'll just turn off the on-screen error reporting on this page (../admin/settings/error-reporting) and hopefully resolve this (minor) problem over time:

Thanks for your help!

Tim

kylehase’s picture

FileSize
665 bytes

I can confirm that this is caused by the inability to reach twitter. (Twitter is down now and the message is up)

Attached a patch for v2.1

pyrowolf’s picture

You need nothing to patch!!!

Go to the "www.yoursite.com/admin/build/themes/settings/ninesixtyrobots" in your Admin Area
and in "Theme-specific settings" from "960"

-> set Checkbox "Use Twitter for site slogan" to OFF

That's all!

pyrowolf’s picture

FileSize
5.99 KB

Here ist the Screenshot :)

kylehase’s picture

@pyrowolf

That's fine if you don't use the feature but it's not a good solution for those who use the feature because they'd have to disable and re-enable the feature every time Twitter goes down. Might need a full time employee for that given Twitter's uptime issues.

s.Daniel’s picture

tracking (error reads warning like this on my site: array_rand() [function.array-rand]: ... on line 70. )

apaderno’s picture

Version: 6.x-2.0 » 6.x-2.x-dev
Issue summary: View changes
Status: Active » Closed (outdated)

I am closing this issue, since it's for a Drupal version no longer supported.