Page MenuHomePhabricator

array_key_exists error in Conpherence thread
Closed, ResolvedPublic

Description

I'm seeing this (non-critical) error appear when viewing Conpherence threads:

array_key_exists(): The first argument should be either a string or an integer
Stack trace:
array_key_exists called at [/srv/phabricator/libphutil/src/utils/utils.php:43]
idx called at [/srv/phabricator/phabricator/src/applications/conpherence/view/ConpherenceThreadListView.php:25]
ConpherenceThreadListView::render called at [/srv/phabricator/phabricator/src/view/AphrontView.php:159]
AphrontView::producePhutilSafeHTML called at [/srv/phabricator/libphutil/src/markup/render.php:132]
phutil_escape_html called at [/srv/phabricator/libphutil/src/markup/render.php:118]
phutil_tag called at [/srv/phabricator/phabricator/src/infrastructure/javelin/markup.php:53]
javelin_tag called at [/srv/phabricator/phabricator/src/applications/conpherence/view/ConpherenceLayoutView.php:122]
ConpherenceLayoutView::render called at [/srv/phabricator/phabricator/src/view/AphrontView.php:159]
AphrontView::producePhutilSafeHTML called at [/srv/phabricator/libphutil/src/markup/render.php:132]
phutil_escape_html called at [/srv/phabricator/libphutil/src/markup/render.php:154]
phutil_escape_html called at [/srv/phabricator/libphutil/src/markup/render.php:154]
phutil_escape_html called at [/srv/phabricator/libphutil/src/markup/render.php:118]
phutil_tag called at [/srv/phabricator/phabricator/src/view/layout/AphrontSideNavFilterView.php:327]
AphrontSideNavFilterView::renderFlexNav called at [/srv/phabricator/phabricator/src/view/layout/AphrontSideNavFilterView.php:211]
AphrontSideNavFilterView::render called at [/srv/phabricator/phabricator/src/view/AphrontView.php:159]
AphrontView::producePhutilSafeHTML called at [/srv/phabricator/libphutil/src/markup/render.php:132]
phutil_escape_html called at [/srv/phabricator/libphutil/src/markup/render.php:186]
phutil_implode_html called at [/srv/phabricator/phabricator/src/view/page/PhabricatorBarePageView.php:58]
PhabricatorBarePageView::willRenderPage called at [/srv/phabricator/phabricator/src/view/page/PhabricatorStandardPageView.php:146]
PhabricatorStandardPageView::willRenderPage called at [/srv/phabricator/phabricator/src/view/page/AphrontPageView.php:46]
AphrontPageView::render called at [/srv/phabricator/phabricator/src/applications/base/controller/PhabricatorController.php:295]
PhabricatorController::buildPageResponse called at [/srv/phabricator/phabricator/src/applications/base/controller/PhabricatorController.php:357]
PhabricatorController::buildApplicationPage called at [/srv/phabricator/phabricator/src/applications/conpherence/controller/ConpherenceListController.php:111]
ConpherenceListController::handleRequest called at [/srv/phabricator/phabricator/src/aphront/configuration/AphrontApplicationConfiguration.php:196]
AphrontApplicationConfiguration::processRequest called at [/srv/phabricator/phabricator/src/aphront/configuration/AphrontApplicationConfiguration.php:121]
AphrontApplicationConfiguration::runHTTPRequest called at [/srv/phabricator/phabricator/webroot/index.php:19]

You can see it by going to https://code.redpointsoftware.com.au/conpherence/.

This is from upgrading Phabricator about 30 minutes ago to HEAD (plus patches, but nothing that touches Conpherence).

Event Timeline

hach-que raised the priority of this task from to Needs Triage.
hach-que updated the task description. (Show Details)
hach-que added a project: Conpherence.
hach-que updated the task description. (Show Details)
hach-que updated the task description. (Show Details)
hach-que added subscribers: hach-que, epriestley.

For some strange reason, it has now disappeared after creating a room...

iiam

These calls:

$rooms = idx($grouped, true, array());
$messages = idx($grouped, false, array());

...should use scalar integers (0, 1) to make underlying calls to array_key_exists() happy. true and false aren't valid array indexes per se, they work by being coerced into an integer representation.

For some strange reason, it has now disappeared after creating a room...

Something similar happened to me yesterday on this instance here (around 2 PM UTC). Trying to open the Conpherence app resulted in an error. After sending the message to you via your user page, I could open Conpherence without issues.

btrahan claimed this task.