The problem was that it was trying to insert messages for users who had not yet logged in (and thus didn't have their folders created for them). I've fixed this in GMail::Messages::insert_user:
Code:
@@ -1729,9 +1729,15 @@
#
my ($self, $insert, $size) = @_;
$size ||= 0;
- my $sth = $DB->table('msgtrack')->insert($insert);
- $DB->table('users')->update({ users_space_used => \"users_space_used + $size" }, { userid => $USER->{userid} });
- return $sth->insert_id();
+# Check that the user has folders before attempting to insert a message.
+# If they don't have folders, then just skip the insert.
+ require GMail::Folders;
+ if (GMail::Folders::inbox_fid()) {
+ my $sth = $DB->table('msgtrack')->insert($insert);
+ $DB->table('users')->update({ users_space_used => \"users_space_used + $size" }, { userid => $USER->{userid} });
+ return $sth->insert_id();
+ }
+ return;
}
END_OF_SUB
Alternatively, just download the updated file from the official bug fixes forum.
Adrian