Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3768375
D873.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
842 B
Referenced Files
None
Subscribers
None
D873.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 07:41 (18 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259753
Default Alt Text
D873.diff (842 B)
Attached To
Mode
D873: Fix null exception when Phabricator object is private
Attached
Detach File
Event Timeline
Log In to Comment