Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2871109
D25778.1736838169.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
2 KB
Referenced Files
None
Subscribers
None
D25778.1736838169.diff
View Options
diff --git a/src/applications/auth/adapter/PhutilBitbucketAuthAdapter.php b/src/applications/auth/adapter/PhutilBitbucketAuthAdapter.php
--- a/src/applications/auth/adapter/PhutilBitbucketAuthAdapter.php
+++ b/src/applications/auth/adapter/PhutilBitbucketAuthAdapter.php
@@ -14,7 +14,7 @@
public function getAccountURI() {
$name = $this->getAccountID();
- if (strlen($name)) {
+ if (phutil_nonempty_string($name)) {
return 'https://bitbucket.org/'.$name;
}
return null;
diff --git a/src/applications/auth/adapter/PhutilGitHubAuthAdapter.php b/src/applications/auth/adapter/PhutilGitHubAuthAdapter.php
--- a/src/applications/auth/adapter/PhutilGitHubAuthAdapter.php
+++ b/src/applications/auth/adapter/PhutilGitHubAuthAdapter.php
@@ -31,7 +31,7 @@
public function getAccountURI() {
$name = $this->getAccountName();
- if (strlen($name)) {
+ if (phutil_nonempty_string($name)) {
return 'https://github.com/'.$name;
}
return null;
diff --git a/src/applications/auth/adapter/PhutilTwitterAuthAdapter.php b/src/applications/auth/adapter/PhutilTwitterAuthAdapter.php
--- a/src/applications/auth/adapter/PhutilTwitterAuthAdapter.php
+++ b/src/applications/auth/adapter/PhutilTwitterAuthAdapter.php
@@ -17,7 +17,7 @@
public function getAccountURI() {
$name = $this->getAccountName();
- if (strlen($name)) {
+ if (phutil_nonempty_string($name)) {
return 'https://twitter.com/'.$name;
}
return null;
diff --git a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelCommitQuery.php b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelCommitQuery.php
--- a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelCommitQuery.php
+++ b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelCommitQuery.php
@@ -126,11 +126,11 @@
$head = $parts[6];
$tail = $parts[7];
- if (strlen($head) && strlen($tail)) {
+ if (phutil_nonempty_string($head) && phutil_nonempty_string($tail)) {
$body = $head."\n\n".$tail;
- } else if (strlen($head)) {
+ } else if (phutil_nonempty_string($head)) {
$body = $head;
- } else if (strlen($tail)) {
+ } else if (phutil_nonempty_string($tail)) {
$body = $tail;
} else {
$body = '';
diff --git a/src/infrastructure/markup/rule/PhabricatorKeyboardRemarkupRule.php b/src/infrastructure/markup/rule/PhabricatorKeyboardRemarkupRule.php
--- a/src/infrastructure/markup/rule/PhabricatorKeyboardRemarkupRule.php
+++ b/src/infrastructure/markup/rule/PhabricatorKeyboardRemarkupRule.php
@@ -22,7 +22,7 @@
foreach ($keys as $k => $v) {
$v = trim($v, " \n");
$v = preg_replace('/\\\\(.)/', '\\1', $v);
- if (!strlen($v)) {
+ if ($v === '') {
unset($keys[$k]);
continue;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 14, 07:02 (4 d, 2 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1113921
Default Alt Text
D25778.1736838169.diff (2 KB)
Attached To
Mode
D25778: Fix various potential PHP 8.1 "strlen(null)" exceptions
Attached
Detach File
Event Timeline
Log In to Comment