Commit cd59ab66 authored by git's avatar git Committed by Josh Caldwell
Browse files

Issue #1691546 by wbobeirne | bmblack: Fixed Warning: Invalid argument...

Issue #1691546 by wbobeirne | bmblack: Fixed Warning: Invalid argument supplied for foreach() in twitter_pull_preprocess()...
parent e963dcce
Loading
Loading
Loading
Loading
+1 −1
Changes for twitter_pull.module: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ function twitter_pull_theme() {
function twitter_pull_preprocess(&$variables, $hook) {
  switch($hook) {
    case 'twitter_pull_listing':
    if (!empty($variables['tweets'])) {
    if (!empty($variables['tweets']) && is_array($variables['tweets'])) {
      foreach ($variables['tweets'] as $key => $tweet) {
        $tweet->time_ago = t('!time ago.', array('!time' => format_interval(time() - $tweet->timestamp)));
        $variables['tweets'][$key] = $tweet;