Changeset View
Changeset View
Standalone View
Standalone View
src/applications/home/menuitem/PhabricatorHomeProfileMenuItem.php
Show All 20 Lines | public function canMakeDefault( | ||||
PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
return true; | return true; | ||||
} | } | ||||
public function getDisplayName( | public function getDisplayName( | ||||
PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
$name = $config->getMenuItemProperty('name'); | $name = $config->getMenuItemProperty('name'); | ||||
if (strlen($name)) { | if (phutil_nonempty_string($name)) { | ||||
valerio.bozzolan: ✅ I debugged `$name` locally with `phlog()` to verify that it only assumes string or null, for… | |||||
return $name; | return $name; | ||||
} | } | ||||
return $this->getDefaultName(); | return $this->getDefaultName(); | ||||
} | } | ||||
public function newPageContent( | public function newPageContent( | ||||
PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
Show All 36 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
✅ I debugged $name locally with phlog() to verify that it only assumes string or null, for example using the Edit Menu Item and similar stuff with fuzzy data.
The phutil_nonempty_string() will report alien values and that is OK.