phpmd: change variable $db to $database.
Add try catch to getFilterOptions() call.