Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIObjectItemListView.php
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | final class PHUIObjectItemListView extends AphrontTagView { | ||||
} | } | ||||
protected function getTagContent() { | protected function getTagContent() { | ||||
$viewer = $this->getUser(); | $viewer = $this->getUser(); | ||||
require_celerity_resource('phui-oi-list-view-css'); | require_celerity_resource('phui-oi-list-view-css'); | ||||
require_celerity_resource('phui-oi-color-css'); | require_celerity_resource('phui-oi-color-css'); | ||||
$header = null; | $header = null; | ||||
if (strlen($this->header)) { | if (phutil_nonempty_string($this->header)) { | ||||
valerio.bozzolan: This is the most risky to me.
✅ Anyway I've done a series of spot checks and it seems… | |||||
$header = phutil_tag( | $header = phutil_tag( | ||||
'h1', | 'h1', | ||||
array( | array( | ||||
'class' => 'phui-oi-list-header', | 'class' => 'phui-oi-list-header', | ||||
), | ), | ||||
$this->header); | $this->header); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 53 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
This is the most risky to me.
✅ Anyway I've done a series of spot checks and it seems everything that call PHUIObjectItemListView#setHeader() is always assuming a string or NULL (like PhabricatorEditEngine#getSummaryHeader() etc.)
If we will encounter issues we can adopt phutil_nonempty_scalar() instead.