Browse files

Twitter plugin: Avoid illegal offset type error during crawl

  • Loading branch information...
1 parent 989190e commit 37a061b458f5e65869c93452b992af3cb93884ae @ginatrapani ginatrapani committed Sep 11, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 webapp/plugins/twitter/model/class.TwitterAPIAccessorOAuth.php
View
4 webapp/plugins/twitter/model/class.TwitterAPIAccessorOAuth.php
@@ -338,7 +338,7 @@ public function parseXML($data) {
'post_count' => (integer)$item->statuses_count,
'network' =>'twitter'
);
- $current_index = current($parsed_payload);
+ $current_index = (count($parsed_payload))-1;
//If a user hasn't posted, there are no statuses
if ( isset($item->status->created_at) ) {
@@ -374,7 +374,7 @@ public function parseXML($data) {
'post_count' => (integer)$item->statuses_count,
'network' => 'twitter'
);
- $current_index = current($parsed_payload);
+ $current_index = (count($parsed_payload))-1;
//If a user hasn't posted, there are no statuses
if ( isset($item->status->created_at) ) {
$parsed_payload[$current_index]['last_post'] = gmdate("Y-m-d H:i:s",

0 comments on commit 37a061b

Please sign in to comment.