Problem getting rid of theme error
It's hard to impossible to know where this error come from without adding some debug statements before the line 980.

Try enabling devel.module and adding following code on line 977:

dpm(func_get_args());
dpm($info);


This will reveal which theme hook is being called and its parameters (variables). It should give enough clues to help you find where the error comes from.