Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIInfoView.php
Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | if (count($errors) > 1) { | ||||
$list); | $list); | ||||
} else if (count($errors) == 1) { | } else if (count($errors) == 1) { | ||||
$list = head($this->errors); | $list = head($this->errors); | ||||
} else { | } else { | ||||
$list = null; | $list = null; | ||||
} | } | ||||
$title = $this->title; | $title = $this->title; | ||||
if ($title || strlen($title)) { | if ($title || phutil_nonempty_string($title)) { | ||||
valerio.bozzolan: Interesting.
I cannot think about any case where `$title` is false but `strlen($title)` would… | |||||
valerio.bozzolanUnsubmitted Done Inline Actions✅ I tested $title locally with phlog() in various places and it seems it's always null or a string like "Issue Resolved" etc. The phutil_nonempty_string() will report alien values, and that is OK. valerio.bozzolan: ✅ I tested `$title` locally with `phlog()` in various places and it seems it's always null or a… | |||||
$title = phutil_tag( | $title = phutil_tag( | ||||
'h1', | 'h1', | ||||
array( | array( | ||||
'class' => 'phui-info-view-head', | 'class' => 'phui-info-view-head', | ||||
), | ), | ||||
$title); | $title); | ||||
} else { | } else { | ||||
$title = null; | $title = null; | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
Interesting.
I cannot think about any case where $title is false but strlen($title) would be true