diff --git a/src/applications/herald/typeahead/HeraldRuleDatasource.php b/src/applications/herald/typeahead/HeraldRuleDatasource.php --- a/src/applications/herald/typeahead/HeraldRuleDatasource.php +++ b/src/applications/herald/typeahead/HeraldRuleDatasource.php @@ -22,7 +22,7 @@ $query = id(new HeraldRuleQuery()) ->setViewer($viewer); - if (preg_match('/^[hH]\d+\z/', $raw_query)) { + if (($raw_query !== null) && preg_match('/^[hH]\d+\z/', $raw_query)) { $id = trim($raw_query, 'hH'); $id = (int)$id; $query->withIDs(array($id));