mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Simplify AphrontRequest::getStrList()
Test Plan: https://secure.phabricator.com/diffusion/P/browse/master/src/aphront/__tests__/AphrontRequestTestCase.php;65bbd24974974672$68-75 Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3531
This commit is contained in:
parent
d119ac672f
commit
f466c54fc0
1 changed files with 1 additions and 4 deletions
|
@ -153,10 +153,7 @@ final class AphrontRequest {
|
|||
return $default;
|
||||
}
|
||||
$list = $this->getStr($name);
|
||||
$list = preg_split('/[\s,]/', $list);
|
||||
$list = array_map('trim', $list);
|
||||
$list = array_filter($list, 'strlen');
|
||||
$list = array_values($list);
|
||||
$list = preg_split('/[\s,]+/', $list, $limit = -1, PREG_SPLIT_NO_EMPTY);
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue