Maniphest home page crash after D19417


Observed Behavior:
Phabricator crashed with an AphrontParameterQueryException while loading /maniphest/ after applying the code change from D19417:

The exception message in nginx/error.log:

2018/05/07 13:29:24 [error] 24957#24957: *6 FastCGI sent in stderr: "PHP message: [2018-05-07 13:29:24] EXCEPTION: (AphrontParameterQueryException) Array for %Ls conversion is empty. Query: task.ownerPHID IN (%Ls) at [<phutil>/src/xsprintf/qsprintf.php:261]
PHP message: arcanist(head=master, ref.master=a60454810102), phabricator(head=master, ref.master=60722f10ba73), phutil(head=master, ref.master=20eff1c8d14f)
PHP message:   #0 <#2> qsprintf_check_type(array, string, string) called at [<phutil>/src/xsprintf/qsprintf.php:134]
PHP message:   #1 <#2> xsprintf_query(AphrontMySQLiDatabaseConnection, string, integer, array, integer) called at [<phutil>/src/xsprintf/xsprintf.php:70]
PHP message:   #2 <#2> xsprintf(string, AphrontMySQLiDatabaseConnection, array) called at [<phutil>/src/xsprintf/qsprintf.php:64]
PHP message:   #3 <#2> qsprintf(AphrontMySQLiDatabaseConnection, string, array) called at [<phabricator>/src/applications/maniphest/query/ManiphestTaskQuery.php:592]
PHP message:   #4 <#2> ManiphestTaskQuery::buildOwnerWhereClause(AphrontMySQLiDatabaseConnection) called at [<phabricator>/src/applications/maniphest/query/ManiphestTaskQuery.php:344]
PHP message:   #5 <#2> ManiphestTaskQuery::buildWhereClauseParts(AphrontMySQLiDatabaseConnection) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:330]
PHP message:   #6 <#2> PhabricatorCursorPagedPolicyAwareQuery::buildWhereClause(AphrontMySQLiDatabaseConnection) called at [<phabricator>/src/applications/maniphest/query/ManiphestTaskQuery.php:230]
PHP message:   #7 <#2> ManiphestTaskQuery::loadPage() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:236]
PHP message:   #8 <#2> PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:232]
PHP message:   #9 <#2> PhabricatorCursorPagedPolicyAwareQuery::executeWithCursorPager(AphrontCursorPagerView) called at [<phabricator>/src/applications/search/engin

Expected Behavior:
Maniphest default home page loads.

Phabricator Version:
60722f10ba7318645e460229cb99414680e6f5bc (Mon, May 7) (branched from 4a98e0ff65a44a208920f553a935f734726e93b2 on origin)
a604548101025875de20a9c263df3790fea425b3 (Fri, Apr 27)
20eff1c8d14f08f05ef72828fa379e871d29662c (Fri, Apr 13)
3.3 at /usr/bin/diff
2.7.4 at /usr/bin/git
Not Available
2.1.3 at /usr/bin/pygmentize
Not Available

Reproduction Steps:
Load the default Maniphest page.

It appears to be fixed by changing the fix in D19417 so it also checks to see if the ownerPHIDs array is empty, like so:

if (($this->ownerPHIDs !== null) and !empty($this->ownerPHIDs)) {

I don’t know what other issues this fix might cause, but things appear to be working after this change.


Load the default Maniphest page.

I can’t reproduce this on, locally, or on a Phacility instance.


Ugh, must be something about our environment then, sorry about that.

Which version of PHP are these instances running?


@epriestley We have a Phacility instance that replicates this issue if you’re interested in pursuing a fix for it. Our Phacility instance domain name is The dashboard that demonstrates it is Dashboard 1 (Home), and it replicates for my user hach-que.

We do not have an active support plan on Phacility (we’re on the old free tier), so I understand if this is not something you want to pursue.


Thanks, that was sufficient for me to identify reproduction steps. Reproduction steps are:

  • Execute a search for tasks with “Assigned to: No Owner” or “Assigned to: Any Owner”, with no additional “Assigned” constraints.

I’ll fix this shortly.




Awesome, thanks @hach-que and @epriestley.