Prevent uncaught warnings/exception on Special:AbuseFilter
This patch addresses two issues observed in WMF production:
- Specifying a search mode without a search pattern would result in a call to mb_stripos (in AbuseFilterPager) with an empty delimiter, which triggers a PHP warning. Avoid this by checking that the search pattern is not the empty string, and unset the search mode if that's the case.
- Trying to use an invalid search mode would result in an unhandled LogicException. We have some code in place to check the validity of the URL parameter, but the relevant code didn't reset the search mode to null, hence AbuseFilterPager would throw before we can show a pretty error to the user.