Steps to reproduce:
<gallery mode="packed" class="center"> File:Test.png|a File:Test.png|b </gallery>
- Put a gallery like the above into a page.
- Save the page, and edit the page with the visual editor
- Click on the gallery you have added
- Flick to the "Options" tab and note the contents of the "Classes" field.
- (Make any change to the page so you can save the page.)
- Check the diff of the page.
Result:
It adds a redundant, undocumented "classes=" parameter: <gallery mode="packed" class="center" classes="center">
This bug originally reported by @BurritoBazooka