diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php index 4bd0cb5655..e0e9d1f8ec 100644 --- a/src/applications/differential/controller/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/DifferentialRevisionViewController.php @@ -278,7 +278,7 @@ final class DifferentialRevisionViewController extends DifferentialController { $changeset_view->setVsMap($vs_map); $changeset_view->setWhitespace($whitespace); if ($repository) { - $changeset_view->setRepository($repository, $target); + $changeset_view->setRepository($repository); } $changeset_view->setSymbolIndexes($symbol_indexes); diff --git a/src/applications/herald/config/HeraldActionConfig.php b/src/applications/herald/config/HeraldActionConfig.php index c5a359d80a..57bce933f5 100644 --- a/src/applications/herald/config/HeraldActionConfig.php +++ b/src/applications/herald/config/HeraldActionConfig.php @@ -97,7 +97,7 @@ final class HeraldActionConfig { self::ACTION_NOTHING, )); default: - throw new Exception("Unknown content type '{$type}'."); + throw new Exception("Unknown content type '{$content_type}'."); } } diff --git a/src/applications/maniphest/controller/ManiphestTaskEditController.php b/src/applications/maniphest/controller/ManiphestTaskEditController.php index fbbb31d14f..42b8d36192 100644 --- a/src/applications/maniphest/controller/ManiphestTaskEditController.php +++ b/src/applications/maniphest/controller/ManiphestTaskEditController.php @@ -327,7 +327,7 @@ final class ManiphestTaskEditController extends ManiphestController { $phids = array_unique($phids); $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles($phids); + ->loadHandles(); $tvalues = mpull($handles, 'getFullName', 'getPHID'); diff --git a/src/applications/oauthserver/controller/PhabricatorOAuthServerTestController.php b/src/applications/oauthserver/controller/PhabricatorOAuthServerTestController.php index f0554c0a83..7036d8b393 100644 --- a/src/applications/oauthserver/controller/PhabricatorOAuthServerTestController.php +++ b/src/applications/oauthserver/controller/PhabricatorOAuthServerTestController.php @@ -29,7 +29,7 @@ extends PhabricatorOAuthServerController { public function processRequest() { $request = $this->getRequest(); $current_user = $request->getUser(); - $server = new PhabricatorOAuthServer($current_user); + $server = new PhabricatorOAuthServer(); $panels = array(); $results = array(); diff --git a/src/applications/phame/controller/post/PhamePostViewController.php b/src/applications/phame/controller/post/PhamePostViewController.php index 8e4d1d106e..94db9b16ad 100644 --- a/src/applications/phame/controller/post/PhamePostViewController.php +++ b/src/applications/phame/controller/post/PhamePostViewController.php @@ -94,10 +94,6 @@ extends PhameController { } else if ($this->getBloggerName() && $this->getPhameTitle()) { $phame_title = $this->getPhameTitle(); $phame_title = PhabricatorSlug::normalize($phame_title); - if ($phame_title != $this->getPhameTitle()) { - $uri = $post->getViewURI($this->getBloggerName()); - return id(new AphrontRedirectResponse())->setURI($uri); - } $blogger = id(new PhabricatorUser())->loadOneWhere( 'username = %s', $this->getBloggerName()); @@ -107,7 +103,11 @@ extends PhameController { $post = id(new PhamePost())->loadOneWhere( 'bloggerPHID = %s AND phameTitle = %s', $blogger->getPHID(), - $this->getPhameTitle()); + $phame_title); + if ($post && $phame_title != $this->getPhameTitle()) { + $uri = $post->getViewURI($this->getBloggerName()); + return id(new AphrontRedirectResponse())->setURI($uri); + } } if (!$post) { diff --git a/src/applications/project/controller/PhabricatorProjectProfileController.php b/src/applications/project/controller/PhabricatorProjectProfileController.php index 9a7528810d..f12a7d9f82 100644 --- a/src/applications/project/controller/PhabricatorProjectProfileController.php +++ b/src/applications/project/controller/PhabricatorProjectProfileController.php @@ -345,8 +345,9 @@ final class PhabricatorProjectProfileController } private function renderSubprojectTable( - PhabricatorObjectHandleData $handles, - $subprojects_phids) { + array $handles, + array $subprojects_phids) { + assert_instances_of($handles, 'PhabricatorObjectHandle'); $rows = array(); foreach ($subprojects_phids as $subproject_phid) { diff --git a/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php b/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php index a7663517dd..62a1b40395 100644 --- a/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php +++ b/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php @@ -67,19 +67,21 @@ final class PhabricatorRepositoryPullLocalDaemon array( 'name' => 'not', 'param' => 'repository', + 'default' => array(), 'repeat' => true, 'help' => 'Do not pull __repository__.', ), array( 'name' => 'repositories', + 'default' => array(), 'wildcard' => true, 'help' => 'Pull specific __repositories__ instead of all.', ), )); $no_discovery = $args->getArg('no-discovery'); - $repo_names = $args->getArg('repositories', array()); - $exclude_names = $args->getArg('not', array()); + $repo_names = $args->getArg('repositories'); + $exclude_names = $args->getArg('not'); // Each repository has an individual pull frequency; after we pull it, // wait that long to pull it again. When we start up, try to pull everything diff --git a/src/applications/search/engine/PhabricatorJumpNavHandler.php b/src/applications/search/engine/PhabricatorJumpNavHandler.php index 16468afc10..f992996b89 100644 --- a/src/applications/search/engine/PhabricatorJumpNavHandler.php +++ b/src/applications/search/engine/PhabricatorJumpNavHandler.php @@ -94,7 +94,7 @@ final class PhabricatorJumpNavHandler { private static function findCloselyNamedProject($name) { $project = id(new PhabricatorProject())->loadOneWhere( 'name = %s', - name); + $name); if ($project) { return $project; } else { // no exact match, try a fuzzy match diff --git a/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php b/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php index e3fdb6c418..754b9b5609 100644 --- a/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php +++ b/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php @@ -36,12 +36,12 @@ final class PhabricatorTaskmasterDaemon extends PhabricatorDaemon { $rows = $conn_w->getAffectedRows(); if (!$rows) { - $rows = queryfx( + queryfx( $conn_w, 'UPDATE %T SET leaseOwner = %s, leaseExpires = UNIX_TIMESTAMP() + 15 WHERE leaseExpires < UNIX_TIMESTAMP() LIMIT 1', - $task_table->getTableName(), - $lease_ownership_name); + $task_table->getTableName(), + $lease_ownership_name); $rows = $conn_w->getAffectedRows(); }