Page MenuHomeDevCentral

D489.diff
No OneTemporary

D489.diff

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

Mime Type
text/plain
Expires
Fri, Oct 4, 11:12 (21 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2174297
Default Alt Text
D489.diff (810 B)

Event Timeline