diff --git a/src/infrastructure/contentsource/PhabricatorContentSource.php b/src/infrastructure/contentsource/PhabricatorContentSource.php --- a/src/infrastructure/contentsource/PhabricatorContentSource.php +++ b/src/infrastructure/contentsource/PhabricatorContentSource.php @@ -81,6 +81,13 @@ )); } + /** + * Get the internal source name + * + * This is usually coming from a SOURCECONST constant. + * + * @return string|null + */ final public function getSource() { return $this->source; } diff --git a/src/infrastructure/contentsource/PhabricatorUnknownContentSource.php b/src/infrastructure/contentsource/PhabricatorUnknownContentSource.php --- a/src/infrastructure/contentsource/PhabricatorUnknownContentSource.php +++ b/src/infrastructure/contentsource/PhabricatorUnknownContentSource.php @@ -7,7 +7,7 @@ public function getSourceName() { $source = $this->getSource(); - if (strlen($source)) { + if ($source) { return pht('Unknown ("%s")', $source); } else { return pht('Unknown');