1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52: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:
vrana 2012-09-20 15:23:38 -07:00
parent d119ac672f
commit f466c54fc0

View file

@ -153,10 +153,7 @@ final class AphrontRequest {
return $default; return $default;
} }
$list = $this->getStr($name); $list = $this->getStr($name);
$list = preg_split('/[\s,]/', $list); $list = preg_split('/[\s,]+/', $list, $limit = -1, PREG_SPLIT_NO_EMPTY);
$list = array_map('trim', $list);
$list = array_filter($list, 'strlen');
$list = array_values($list);
return $list; return $list;
} }