mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-01 18:30:59 +01:00
Don't fail with no image macros
Summary: .. IN (%Ls) with no file phids fails miserably. Test Plan: Went to /file/macro/ with and without patch. An exception is thrown without it. Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: 1063
This commit is contained in:
parent
0d5b0f21ad
commit
c724902ca9
1 changed files with 10 additions and 6 deletions
|
@ -43,12 +43,16 @@ class PhabricatorFileMacroListController extends PhabricatorFileController {
|
|||
$pager->setURI($request->getRequestURI(), 'page');
|
||||
|
||||
$file_phids = mpull($macros, 'getFilePHID');
|
||||
|
||||
$files = array();
|
||||
if ($file_phids) {
|
||||
$files = id(new PhabricatorFile())->loadAllWhere(
|
||||
"phid IN (%Ls)",
|
||||
$file_phids);
|
||||
$author_phids = mpull($files, 'getAuthorPHID', 'getPHID');
|
||||
$handles = id(new PhabricatorObjectHandleData($author_phids))
|
||||
->loadHandles();
|
||||
}
|
||||
|
||||
$rows = array();
|
||||
foreach ($macros as $macro) {
|
||||
|
|
Loading…
Reference in a new issue