Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4039382
D489.id1188.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
810 B
Referenced Files
None
Subscribers
None
D489.id1188.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
@@ -108,6 +108,10 @@
* @return string The object type, as a 4 letters string (e.g. 'TASK')
*/
public function getObjectType () {
+ if (!array_key_exists('objectPHID', $this->data)) {
+ return 'MISC';
+ }
+
return substr($this->data['objectPHID'], 5, 4);
}
@@ -117,6 +121,10 @@
* return string[] The list of project PHIDs
*/
public function getProjectsPHIDs () {
+ if (!array_key_exists('objectPHID', $this->data)) {
+ return [];
+ }
+
$objectPHID = $this->data['objectPHID'];
$objectType = $this->getObjectType();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 23, 01:22 (12 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2370668
Default Alt Text
D489.id1188.diff (810 B)
Attached To
Mode
D489: Fix getObjectType and getProjectsPHIDs exceptions
Attached
Detach File
Event Timeline
Log In to Comment