Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2878658
D25132.1737023309.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
6 KB
Referenced Files
None
Subscribers
None
D25132.1737023309.diff
View Options
diff --git a/src/applications/config/check/PhabricatorDaemonsSetupCheck.php b/src/applications/config/check/PhabricatorDaemonsSetupCheck.php
--- a/src/applications/config/check/PhabricatorDaemonsSetupCheck.php
+++ b/src/applications/config/check/PhabricatorDaemonsSetupCheck.php
@@ -53,7 +53,7 @@
}
$expect_user = PhabricatorEnv::getEnvConfig('phd.user');
- if (strlen($expect_user)) {
+ if (phutil_nonempty_string($expect_user)) {
try {
$all_daemons = id(new PhabricatorDaemonLogQuery())
diff --git a/src/applications/files/view/PhabricatorGlobalUploadTargetView.php b/src/applications/files/view/PhabricatorGlobalUploadTargetView.php
--- a/src/applications/files/view/PhabricatorGlobalUploadTargetView.php
+++ b/src/applications/files/view/PhabricatorGlobalUploadTargetView.php
@@ -67,7 +67,7 @@
require_celerity_resource('global-drag-and-drop-css');
$hint_text = $this->getHintText();
- if (!strlen($hint_text)) {
+ if (!phutil_nonempty_string($hint_text)) {
$hint_text = "\xE2\x87\xAA ".pht('Drop Files to Upload');
}
diff --git a/src/applications/home/menuitem/PhabricatorHomeLauncherProfileMenuItem.php b/src/applications/home/menuitem/PhabricatorHomeLauncherProfileMenuItem.php
--- a/src/applications/home/menuitem/PhabricatorHomeLauncherProfileMenuItem.php
+++ b/src/applications/home/menuitem/PhabricatorHomeLauncherProfileMenuItem.php
@@ -31,7 +31,7 @@
PhabricatorProfileMenuItemConfiguration $config) {
$name = $config->getMenuItemProperty('name');
- if (strlen($name)) {
+ if (phutil_nonempty_string($name)) {
return $name;
}
diff --git a/src/applications/search/engine/PhabricatorProfileMenuEngine.php b/src/applications/search/engine/PhabricatorProfileMenuEngine.php
--- a/src/applications/search/engine/PhabricatorProfileMenuEngine.php
+++ b/src/applications/search/engine/PhabricatorProfileMenuEngine.php
@@ -1308,7 +1308,7 @@
// render the default view instead.
$selected_view = null;
- if (strlen($item_id)) {
+ if (phutil_nonempty_string($item_id)) {
$item_views = $view_list->getViewsWithItemIdentifier($item_id);
if ($item_views) {
$selected_view = head($item_views);
diff --git a/src/applications/search/engine/PhabricatorProfileMenuItemView.php b/src/applications/search/engine/PhabricatorProfileMenuItemView.php
--- a/src/applications/search/engine/PhabricatorProfileMenuItemView.php
+++ b/src/applications/search/engine/PhabricatorProfileMenuItemView.php
@@ -140,7 +140,7 @@
->setName($this->getName());
$uri = $this->getURI();
- if (strlen($uri)) {
+ if (phutil_nonempty_string($uri)) {
if ($this->getIsExternalLink()) {
if (!PhabricatorEnv::isValidURIForLink($uri)) {
$uri = '#';
@@ -176,7 +176,7 @@
}
$tooltip = $this->getTooltip();
- if (strlen($tooltip)) {
+ if (phutil_nonempty_string($tooltip)) {
$view->setTooltip($tooltip);
}
diff --git a/src/applications/search/menuitem/PhabricatorDashboardProfileMenuItem.php b/src/applications/search/menuitem/PhabricatorDashboardProfileMenuItem.php
--- a/src/applications/search/menuitem/PhabricatorDashboardProfileMenuItem.php
+++ b/src/applications/search/menuitem/PhabricatorDashboardProfileMenuItem.php
@@ -117,7 +117,7 @@
return pht('Archived Dashboard');
}
- if (strlen($this->getName($config))) {
+ if (phutil_nonempty_string($this->getName($config))) {
return $this->getName($config);
} else {
return $dashboard->getName();
diff --git a/src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php b/src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php
--- a/src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php
+++ b/src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php
@@ -71,7 +71,7 @@
if (!$form) {
return pht('(Restricted/Invalid Form)');
}
- if (strlen($this->getName($config))) {
+ if (phutil_nonempty_string($this->getName($config))) {
return $this->getName($config);
} else {
return $form->getName();
diff --git a/src/applications/search/menuitem/PhabricatorManageProfileMenuItem.php b/src/applications/search/menuitem/PhabricatorManageProfileMenuItem.php
--- a/src/applications/search/menuitem/PhabricatorManageProfileMenuItem.php
+++ b/src/applications/search/menuitem/PhabricatorManageProfileMenuItem.php
@@ -31,7 +31,7 @@
PhabricatorProfileMenuItemConfiguration $config) {
$name = $config->getMenuItemProperty('name');
- if (strlen($name)) {
+ if (phutil_nonempty_string($name)) {
return $name;
}
diff --git a/src/view/page/PhabricatorStandardPageView.php b/src/view/page/PhabricatorStandardPageView.php
--- a/src/view/page/PhabricatorStandardPageView.php
+++ b/src/view/page/PhabricatorStandardPageView.php
@@ -188,7 +188,7 @@
}
}
- if (strlen($prefix)) {
+ if (phutil_nonempty_string($prefix)) {
$title = $prefix.' '.$title;
}
diff --git a/src/view/page/menu/PhabricatorMainMenuView.php b/src/view/page/menu/PhabricatorMainMenuView.php
--- a/src/view/page/menu/PhabricatorMainMenuView.php
+++ b/src/view/page/menu/PhabricatorMainMenuView.php
@@ -333,7 +333,7 @@
$wordmark_text = PhabricatorCustomLogoConfigType::getLogoWordmark();
- if (!strlen($wordmark_text)) {
+ if (!phutil_nonempty_string($wordmark_text)) {
$wordmark_text = PlatformSymbols::getPlatformServerName();
}
diff --git a/src/view/phui/PHUIObjectItemListView.php b/src/view/phui/PHUIObjectItemListView.php
--- a/src/view/phui/PHUIObjectItemListView.php
+++ b/src/view/phui/PHUIObjectItemListView.php
@@ -120,7 +120,7 @@
require_celerity_resource('phui-oi-color-css');
$header = null;
- if (strlen($this->header)) {
+ if (phutil_nonempty_string($this->header)) {
$header = phutil_tag(
'h1',
array(
diff --git a/src/view/phui/PHUIObjectItemView.php b/src/view/phui/PHUIObjectItemView.php
--- a/src/view/phui/PHUIObjectItemView.php
+++ b/src/view/phui/PHUIObjectItemView.php
@@ -659,7 +659,7 @@
$this->getImageIcon());
}
- if ($image && (strlen($this->href) || strlen($this->imageHref))) {
+ if ($image && (phutil_nonempty_string($this->href) || phutil_nonempty_string($this->imageHref))) {
$image_href = ($this->imageHref) ? $this->imageHref : $this->href;
$image = phutil_tag(
'a',
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 16, 10:28 (20 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1118353
Default Alt Text
D25132.1737023309.diff (6 KB)
Attached To
Mode
D25132: Fix numerous PHP 8.1 "strlen(null)" exceptions preventing homepage to display
Attached
Detach File
Event Timeline
Log In to Comment