Page MenuHomePhorge

D25214.1734649474.diff
No OneTemporary

D25214.1734649474.diff

diff --git a/src/applications/owners/typeahead/PhabricatorOwnersPackageDatasource.php b/src/applications/owners/typeahead/PhabricatorOwnersPackageDatasource.php
--- a/src/applications/owners/typeahead/PhabricatorOwnersPackageDatasource.php
+++ b/src/applications/owners/typeahead/PhabricatorOwnersPackageDatasource.php
@@ -26,7 +26,7 @@
// If the user is querying by monogram explicitly, like "O123", do an ID
// search. Otherwise, do an ngram substring search.
- if (preg_match('/^[oO]\d+\z/', $raw_query)) {
+ if ($raw_query && preg_match('/^[oO]\d+\z/', $raw_query)) {
$id = trim($raw_query, 'oO');
$id = (int)$id;
$query->withIDs(array($id));
diff --git a/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php b/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
--- a/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
+++ b/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
@@ -2449,7 +2449,7 @@
PhabricatorSearchNgrams $index,
$value) {
- if (strlen($value)) {
+ if (phutil_nonempty_string($value)) {
$this->ngrams[] = array(
'index' => $index,
'value' => $value,

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 23:04 (20 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1015519
Default Alt Text
D25214.1734649474.diff (1 KB)

Event Timeline