diff --git a/src/infrastructure/contentsource/PhabricatorContentSource.php b/src/infrastructure/contentsource/PhabricatorContentSource.php index ee77052113..de36f50b1f 100644 --- a/src/infrastructure/contentsource/PhabricatorContentSource.php +++ b/src/infrastructure/contentsource/PhabricatorContentSource.php @@ -81,6 +81,13 @@ abstract class PhabricatorContentSource extends Phobject { )); } + /** + * 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 index a0dfd042d7..7b8c063b8a 100644 --- a/src/infrastructure/contentsource/PhabricatorUnknownContentSource.php +++ b/src/infrastructure/contentsource/PhabricatorUnknownContentSource.php @@ -7,7 +7,7 @@ final class PhabricatorUnknownContentSource public function getSourceName() { $source = $this->getSource(); - if (strlen($source)) { + if ($source) { return pht('Unknown ("%s")', $source); } else { return pht('Unknown');