Another safety check contributed by trac-ja.
This one prevents a badly set value for an enum to completely break the ticket subsystem.
Fixes #6780.
Authored by: cboos 2008-02-20
Parent: [r6580]
Child: [r6582]