Hey, guys!
I found out that variable $i
doesn't use anywhere in theme_table() on line 2034 in /includes/theme.inc file and also, I saw some other not logical things in this function (for example checking count() before foreach() cycle) and refactored it. Please, review my patch and ask me questions, I'll explain all my changes. Thanks