diff --git a/src/view/phui/PHUISegmentBarSegmentView.php b/src/view/phui/PHUISegmentBarSegmentView.php --- a/src/view/phui/PHUISegmentBarSegmentView.php +++ b/src/view/phui/PHUISegmentBarSegmentView.php @@ -26,6 +26,11 @@ return $this; } + /** + * Set a Tooltip. + * @param string|null $tooltip + * @return self + */ public function setTooltip($tooltip) { $this->tooltip = $tooltip; return $this; @@ -55,7 +60,7 @@ $left = sprintf('%.2f%%', $left); $tooltip = $this->tooltip; - if (strlen($tooltip)) { + if (phutil_nonempty_string($tooltip)) { Javelin::initBehavior('phabricator-tooltips'); $sigil = 'has-tooltip';