diff --git a/src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php b/src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php index 7133cff042..672772eab3 100644 --- a/src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php +++ b/src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php @@ -160,7 +160,7 @@ abstract class PhabricatorOAuth1AuthProvider switch ($key) { case self::PROPERTY_CONSUMER_KEY: - if (strlen($old)) { + if (phutil_nonempty_string($old)) { return pht( '%s updated the OAuth consumer key for this provider from '. '"%s" to "%s".', @@ -175,7 +175,7 @@ abstract class PhabricatorOAuth1AuthProvider $new); } case self::PROPERTY_CONSUMER_SECRET: - if (strlen($old)) { + if (phutil_nonempty_string($old)) { return pht( '%s updated the OAuth consumer secret for this provider.', $xaction->renderHandleLink($author_phid)); diff --git a/src/applications/auth/provider/PhabricatorOAuthAuthProvider.php b/src/applications/auth/provider/PhabricatorOAuthAuthProvider.php index df76c655f3..f813a37c43 100644 --- a/src/applications/auth/provider/PhabricatorOAuthAuthProvider.php +++ b/src/applications/auth/provider/PhabricatorOAuthAuthProvider.php @@ -144,7 +144,7 @@ abstract class PhabricatorOAuthAuthProvider extends PhabricatorAuthProvider { switch ($key) { case self::PROPERTY_NOTE: - if (strlen($old)) { + if (phutil_nonempty_string($old)) { return pht( '%s updated the OAuth application notes for this provider.', $xaction->renderHandleLink($author_phid));