Type check line 31, TemplatesHelper::getPositions

Dont know if you would call this a fix or not but checking if the $positions is an array removes the error displayed. I guess TemplatesHelper::getPositions doesnt allways return a proper result.