diff --git a/support/startup/PhabricatorStartup.php b/support/startup/PhabricatorStartup.php --- a/support/startup/PhabricatorStartup.php +++ b/support/startup/PhabricatorStartup.php @@ -174,15 +174,13 @@ } $msg = ">>> UNRECOVERABLE FATAL ERROR <<<\n\n"; - if ($event) { - // Even though we should be emitting this as text-plain, escape things - // just to be sure since we can't really be sure what the program state - // is when we get here. - $msg .= htmlspecialchars( - $event['message']."\n\n".$event['file'].':'.$event['line'], - ENT_QUOTES, - 'UTF-8'); - } + // Even though we should be emitting this as text-plain, escape things + // just to be sure since we can't really be sure what the program state + // is when we get here. + $msg .= htmlspecialchars( + $event['message']."\n\n".$event['file'].':'.$event['line'], + ENT_QUOTES, + 'UTF-8'); // flip dem tables $msg .= "\n\n\n"; diff --git a/src/view/control/AphrontTableView.php b/src/view/control/AphrontTableView.php --- a/src/view/control/AphrontTableView.php +++ b/src/view/control/AphrontTableView.php @@ -188,7 +188,7 @@ if ($sort_value == $this->sortSelected) { if ($this->sortReverse) { $sort_glyph_class = 'aphront-table-up-sort'; - } else if (!$this->sortReverse) { + } else { $sort_value = '-'.$sort_value; } $classes[] = 'aphront-table-view-sortable-selected'; diff --git a/src/view/phui/PHUITimelineEventView.php b/src/view/phui/PHUITimelineEventView.php --- a/src/view/phui/PHUITimelineEventView.php +++ b/src/view/phui/PHUITimelineEventView.php @@ -750,7 +750,7 @@ )); if (!$is_admin && !$can_interact) { - $remove_item->setDisabled(!$is_admin && !$can_interact); + $remove_item->setDisabled(true); } else { $remove_item->setColor(PhabricatorActionView::RED); } diff --git a/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php b/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php --- a/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php +++ b/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php @@ -158,21 +158,17 @@ if ($request->isFormPost()) { try { - if (phutil_nonempty_string($username) && $has_password) { - $adapter = $this->getAdapter(); - $adapter->setLoginUsername($username); - $adapter->setLoginPassword($password); + $adapter = $this->getAdapter(); + $adapter->setLoginUsername($username); + $adapter->setLoginPassword($password); - // TODO: This calls ldap_bind() eventually, which dumps cleartext - // passwords to the error log. See note in PhutilLDAPAuthAdapter. - // See T3351. + // TODO: This calls ldap_bind() eventually, which dumps cleartext + // passwords to the error log. See note in PhutilLDAPAuthAdapter. + // See T3351. - DarkConsoleErrorLogPluginAPI::enableDiscardMode(); - $identifiers = $adapter->getAccountIdentifiers(); - DarkConsoleErrorLogPluginAPI::disableDiscardMode(); - } else { - throw new Exception(pht('Username and password are required!')); - } + DarkConsoleErrorLogPluginAPI::enableDiscardMode(); + $identifiers = $adapter->getAccountIdentifiers(); + DarkConsoleErrorLogPluginAPI::disableDiscardMode(); } catch (PhutilAuthCredentialException $ex) { $response = $controller->buildProviderPageResponse( $this, diff --git a/src/applications/fact/controller/PhabricatorFactObjectController.php b/src/applications/fact/controller/PhabricatorFactObjectController.php --- a/src/applications/fact/controller/PhabricatorFactObjectController.php +++ b/src/applications/fact/controller/PhabricatorFactObjectController.php @@ -210,15 +210,13 @@ continue; } - if (!$has_any) { - $rows[] = array( - $icon_nodata, - $fact->getName(), - null, - null, - null, - ); - } + $rows[] = array( + $icon_nodata, + $fact->getName(), + null, + null, + null, + ); } $table = id(new AphrontTableView($rows)) diff --git a/src/applications/maniphest/conduit/ManiphestConduitAPIMethod.php b/src/applications/maniphest/conduit/ManiphestConduitAPIMethod.php --- a/src/applications/maniphest/conduit/ManiphestConduitAPIMethod.php +++ b/src/applications/maniphest/conduit/ManiphestConduitAPIMethod.php @@ -67,7 +67,7 @@ } else { $comments = $request->getValue('comments'); - if (!$is_new && $comments !== null) { + if ($comments !== null) { $changes[PhabricatorTransactions::TYPE_COMMENT] = null; } diff --git a/src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php b/src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php --- a/src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php +++ b/src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php @@ -118,7 +118,7 @@ // OK. } else if ($importing) { // OK. - } else if (!$any_step && !$importing) { + } else { throw new PhutilArgumentUsageException( pht( 'Specify which steps to reparse with "--message", "--change", '.