Only get phid if project exists
Summary: If a project phriction page already exists, but object does not, avoid a fatal error. Test Plan: See https://github.com/facebook/phabricator/issues/123 Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D2749
This commit is contained in:
@@ -115,7 +115,9 @@ final class PhrictionDocumentController
|
|||||||
$project = id(new PhabricatorProject())->loadOneWhere(
|
$project = id(new PhabricatorProject())->loadOneWhere(
|
||||||
'phrictionSlug = %s',
|
'phrictionSlug = %s',
|
||||||
PhrictionDocument::getProjectSlugIdentifier($slug));
|
PhrictionDocument::getProjectSlugIdentifier($slug));
|
||||||
$project_phid = $project->getPHID();
|
if ($project) {
|
||||||
|
$project_phid = $project->getPHID();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$phids = array_filter(
|
$phids = array_filter(
|
||||||
|
|||||||
Reference in New Issue
Block a user