diff --git a/src/view/phui/PHUISegmentBarView.php b/src/view/phui/PHUISegmentBarView.php --- a/src/view/phui/PHUISegmentBarView.php +++ b/src/view/phui/PHUISegmentBarView.php @@ -5,6 +5,9 @@ private $label; private $segments = array(); + /** + * @param string|PhutilSafeHTML|null + */ public function setLabel($label) { $this->label = $label; return $this; @@ -30,7 +33,8 @@ require_celerity_resource('phui-segment-bar-view-css'); $label = $this->label; - if (strlen($label)) { + $not_empty = phutil_string_cast($label) !== ''; + if ($not_empty) { $label = phutil_tag( 'div', array(