Differential D25179 Diff 637 src/applications/typeahead/datasource/PhabricatorTypeaheadCompositeDatasource.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/typeahead/datasource/PhabricatorTypeaheadCompositeDatasource.php
Show All 22 Lines | public function getDatasourceApplicationClass() { | ||||
return null; | return null; | ||||
} | } | ||||
public function loadResults() { | public function loadResults() { | ||||
$phases = array(); | $phases = array(); | ||||
// We only need to do a prefix phase query if there's an actual query | // We only need to do a prefix phase query if there's an actual query | ||||
// string. If the user didn't type anything, nothing can possibly match it. | // string. If the user didn't type anything, nothing can possibly match it. | ||||
if (strlen($this->getRawQuery())) { | if (phutil_nonempty_string($this->getRawQuery())) { | ||||
valerio.bozzolan: ✅ Yes, the input string is always a string or null.
The function `phutil_nonempty_string()`… | |||||
$phases[] = self::PHASE_PREFIX; | $phases[] = self::PHASE_PREFIX; | ||||
} | } | ||||
$phases[] = self::PHASE_CONTENT; | $phases[] = self::PHASE_CONTENT; | ||||
$offset = $this->getOffset(); | $offset = $this->getOffset(); | ||||
$limit = $this->getLimit(); | $limit = $this->getLimit(); | ||||
▲ Show 20 Lines • Show All 294 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
✅ Yes, the input string is always a string or null.
The function phutil_nonempty_string() will report alien values and that is OK.