Ett Ryanair-plan på väg till Sverige från Barcelona fick nödlanda under onsdagskvällen på grund av en incident på planets toalett.