Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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!
Comment | File | Size | Author |
---|---|---|---|
#5 | twitter-off.png | 5.99 KB | pyrowolf |
#3 | template.patch | 665 bytes | kylehase |
Comments
Comment #1
jjeff CreditAttribution: jjeff commentedI 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.
Comment #2
timhobert CreditAttribution: timhobert commentedInteresting. 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
Comment #3
kylehase CreditAttribution: kylehase commentedI 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
Comment #4
pyrowolf CreditAttribution: pyrowolf commentedYou 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!
Comment #5
pyrowolf CreditAttribution: pyrowolf commentedHere ist the Screenshot :)
Comment #6
kylehase CreditAttribution: kylehase commented@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.
Comment #7
s.Daniel CreditAttribution: s.Daniel commentedtracking (error reads warning like this on my site: array_rand() [function.array-rand]: ... on line 70. )
Comment #8
apadernoI am closing this issue, since it's for a Drupal version no longer supported.