Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2682320
D25414.1734653846.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
656 B
Referenced Files
None
Subscribers
None
D25414.1734653846.diff
View Options
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(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 00:17 (21 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1016266
Default Alt Text
D25414.1734653846.diff (656 B)
Attached To
Mode
D25414: Fix PHP 8.1 "strlen(null)" exception rendering PHUISegmentBar without a label
Attached
Detach File
Event Timeline
Log In to Comment