Page MenuHomePhabricator

Hitting 'Show older changes' on (some) revisions throws an exception in DifferentialTransactionComment::sortAndGroupInlines()
Closed, ResolvedPublic

Description

Go to https://phabricator.haskell.org/D550, which is a really big diff that has a lot of really cool stuff.

When you hit 'Show Older Changes' just below the revision summary, the UI throws an exception:

Argument 2 passed to DifferentialTransactionComment::sortAndGroupInlines() must be of the type array, null given, called in /opt/phabricator/src/applications/differential/view/DifferentialTransactionView.php

However, this does not happen on other diffs. For example, 'Show Older Changes' works just fine on https://phabricator.haskell.org/D556

Full stack trace below:

2014/12/10 00:28:40 [error] 6051#0: *18 FastCGI sent in stderr: "PHP message: [2014-12-09 18:28:40] EXCEPTION: (InvalidArgumentException) Argument 2 passed to DifferentialTransactionComment::sortAndGroupInlines() must be of the type array, null given, called in /opt/phabricator/src/applications/differential/view/DifferentialTransactionView.php on line 118 and defined at [<phutil>/src/error/PhutilErrorHandler.php:200]
PHP message:   #0 PhutilErrorHandler::handleError(integer, string, string, integer, array) called at [<phabricator>/src/applications/differential/storage/DifferentialTransactionComment.php:52]
PHP message:   #1 DifferentialTransactionComment::sortAndGroupInlines(array, NULL) called at [<phabricator>/src/applications/differential/view/DifferentialTransactionView.php:118]
PHP message:   #2 DifferentialTransactionView::renderTransactionContent(DifferentialTransaction) called at [<phabricator>/src/applications/transactions/view/PhabricatorApplicationTransactionView.php:449]
PHP message:   #3 PhabricatorApplicationTransactionView::renderEvent(DifferentialTransaction, array) called at [<phabricator>/src/applications/transactions/view/PhabricatorApplicationTransactionView.php:139]
PHP message:   #4 PhabricatorApplicationTransactionView::buildEvents(boolean) called at [<phabricator>/src/applications/transactions/view/PhabricatorApplicationTransactionView.php:182]
PHP message:   #5 PhabricatorApplicationTransactionView::buildPHUITimelineView(boolean) called at [<phabricator>/src/applications/transactions/controller/PhabricatorApplicationTransactionShowOlderController.php:46]
PHP message:   #6 PhabricatorApplicationTransactionShowOlderController::handleRequest(AphrontRequest) called at [<phabricator>/webroot/index.php:103]" while reading response header from upstream, client: 173.245.50.166, server: phabricator.haskell.org, request: "POST /transactions/showolder/PHID-DREV-bssniqjlrjmg27prd2py/?after=15450 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "phabricator.haskell.org"

We're using the latest Phabricator HEAD (rPf6e635c8d27971)

Event Timeline

thoughtpolice raised the priority of this task from to Needs Triage.
thoughtpolice updated the task description. (Show Details)
thoughtpolice added a project: Phabricator.
thoughtpolice added a subscriber: thoughtpolice.

Related, the actual summary the UI box gives me when the exception is thrown is:

Argument 2 passed to DifferentialTransactionComment::sortAndGroupInlines() must be of the type array, null given, called in /opt/phabricator/src/applications/differential/view/DifferentialTransactionView.php on line 118 and defined

I just clipped the useless "on line 118 and defined" part in the original comment; so this error in the UI is just a truncated version of what appears in our nginx error.log. Presumably this should be the full exception message; I'm not sure.

Should I file a separate bug about this behavior?

I presume this was resolved in D10935, but will keep open if not.

thoughtpolice claimed this task.

Yup, thanks!