diff --git a/src/applications/auth/controller/PhabricatorAuthRegisterController.php b/src/applications/auth/controller/PhabricatorAuthRegisterController.php --- a/src/applications/auth/controller/PhabricatorAuthRegisterController.php +++ b/src/applications/auth/controller/PhabricatorAuthRegisterController.php @@ -18,7 +18,7 @@ $invite = $this->loadInvite(); $is_setup = false; - if (strlen($account_key)) { + if (phutil_nonempty_string($account_key)) { $result = $this->loadAccountForRegistrationOrLinking($account_key); list($account, $provider, $response) = $result; $is_default = false; @@ -244,9 +244,9 @@ $require_real_name = PhabricatorEnv::getEnvConfig('user.require-real-name'); - $e_username = strlen($value_username) ? null : true; + $e_username = phutil_nonempty_string($value_username) ? null : true; $e_realname = $require_real_name ? true : null; - $e_email = strlen($value_email) ? null : true; + $e_email = phutil_nonempty_string($value_email) ? null : true; $e_password = true; $e_captcha = true; diff --git a/src/applications/base/controller/PhabricatorController.php b/src/applications/base/controller/PhabricatorController.php --- a/src/applications/base/controller/PhabricatorController.php +++ b/src/applications/base/controller/PhabricatorController.php @@ -74,7 +74,7 @@ $session_engine = new PhabricatorAuthSessionEngine(); $phsid = $request->getCookie(PhabricatorCookies::COOKIE_SESSION); - if (strlen($phsid)) { + if (phutil_nonempty_string($phsid)) { $session_user = $session_engine->loadUserForSession( PhabricatorAuthSession::TYPE_WEB, $phsid); 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/people/storage/PhabricatorUser.php b/src/applications/people/storage/PhabricatorUser.php --- a/src/applications/people/storage/PhabricatorUser.php +++ b/src/applications/people/storage/PhabricatorUser.php @@ -1159,7 +1159,7 @@ } public function getSSHKeyDefaultName() { - return 'id_rsa_phabricator'; + return 'id_rsa_phorge'; } public function getSSHKeyNotifyPHIDs() { diff --git a/src/view/form/control/AphrontFormControl.php b/src/view/form/control/AphrontFormControl.php --- a/src/view/form/control/AphrontFormControl.php +++ b/src/view/form/control/AphrontFormControl.php @@ -172,7 +172,7 @@ $this->renderInput()); $error = null; - if (strlen($this->getError())) { + if ($this->getError()) { $error = $this->getError(); if ($error === true) { $error = phutil_tag( @@ -187,7 +187,7 @@ } } - if (strlen($this->getLabel())) { + if (phutil_nonempty_string($this->getLabel())) { $label = phutil_tag( 'label', array( @@ -203,7 +203,7 @@ $custom_class .= ' aphront-form-control-nolabel'; } - if (strlen($this->getCaption())) { + if (phutil_nonempty_string($this->getCaption())) { $caption = phutil_tag( 'div', array('class' => 'aphront-form-caption'), 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(); }