Page MenuHomePhorge

D25375.1732639061.diff
No OneTemporary

D25375.1732639061.diff

diff --git a/src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php b/src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php
--- a/src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php
+++ b/src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php
@@ -67,7 +67,7 @@
}
$denied = $request->getStr('denied');
- if (strlen($denied)) {
+ if ($denied) {
// Twitter indicates that the user cancelled the login attempt by
// returning "denied" as a parameter.
throw new PhutilAuthUserAbortedException();
diff --git a/src/applications/auth/view/PhabricatorAuthAccountView.php b/src/applications/auth/view/PhabricatorAuthAccountView.php
--- a/src/applications/auth/view/PhabricatorAuthAccountView.php
+++ b/src/applications/auth/view/PhabricatorAuthAccountView.php
@@ -29,13 +29,14 @@
$realname = $account->getRealName();
$use_name = null;
- if (strlen($dispname)) {
+ if (phutil_nonempty_string($dispname)) {
$use_name = $dispname;
- } else if (strlen($username) && strlen($realname)) {
+ } else if (phutil_nonempty_string($username) &&
+ phutil_nonempty_string($realname)) {
$use_name = $username.' ('.$realname.')';
- } else if (strlen($username)) {
+ } else if (phutil_nonempty_string($username)) {
$use_name = $username;
- } else if (strlen($realname)) {
+ } else if (phutil_nonempty_string($realname)) {
$use_name = $realname;
}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 16:37 (6 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
997742
Default Alt Text
D25375.1732639061.diff (1 KB)

Event Timeline