Page MenuHomeDevCentral

D873.diff
No OneTemporary

D873.diff

diff --git a/app/Phabricator/PhabricatorStory.php b/app/Phabricator/PhabricatorStory.php
--- a/app/Phabricator/PhabricatorStory.php
+++ b/app/Phabricator/PhabricatorStory.php
@@ -256,7 +256,16 @@
]
);
- return PhabricatorAPI::getFirstResult($reply)->attachments->projects->projectPHIDs;
+ $apiResult = PhabricatorAPI::getFirstResult($reply);
+ if ($apiResult === null) {
+ // Object information (e.g. a paste) can't be fetched (T1138).
+ // This occurs when the bot account used to fetch information
+ // doesn't have access to the object, for example if it's
+ // in a private space or restricted to a group it doesn't belong to.
+ return [];
+ }
+
+ return $apiResult->attachments->projects->projectPHIDs;
}
/**

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 07:41 (20 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259753
Default Alt Text
D873.diff (842 B)

Event Timeline