Skip to content

Commit 7732f9c

Browse files
Chad Littlechad
authored andcommitted
Fix bad query on PhameHome with no Blogs
Summary: We're checking for drafts even though we already know there are no blogs, just skip the query. Test Plan: trucate phame_blogs; See proper blank state. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D14908
1 parent 1443e4b commit 7732f9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/applications/phame/controller/PhameHomeController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function handleRequest(AphrontRequest $request) {
8585
->setViewer($viewer);
8686

8787
$draft_list = null;
88-
if ($viewer->isLoggedIn()) {
88+
if ($viewer->isLoggedIn() && $blogs) {
8989
$drafts = id(new PhamePostQuery())
9090
->setViewer($viewer)
9191
->withBloggerPHIDs(array($viewer->getPHID()))

0 commit comments

Comments
 (0)