From 02ccca4bbdc090aea049dc1ec13bfbe3a9d1d412 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 5 Aug 2013 10:27:50 -0700 Subject: [PATCH] Fix Maniphest fatal if attached tasks are not an array Summary: Fixes T3678. I think some very old rows may have a junk value here. This will be obsoleted by ApplicationTransactions and other modernization, most likely, so just fix it locally. Test Plan: looked at a task Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T3678 Differential Revision: https://secure.phabricator.com/D6677 --- .../maniphest/controller/ManiphestTaskDetailController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php index d5bf49249f..1029f2655a 100644 --- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php +++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php @@ -566,6 +566,10 @@ final class ManiphestTaskDetailController extends ManiphestController { } $attached = $task->getAttached(); + if (!is_array($attached)) { + $attached = array(); + } + $file_infos = idx($attached, PhabricatorFilePHIDTypeFile::TYPECONST); if ($file_infos) { $file_phids = array_keys($file_infos);