diff --git a/src/applications/diffusion/controller/DiffusionBrowseController.php b/src/applications/diffusion/controller/DiffusionBrowseController.php index 6fd164f2a7..7450c3921a 100644 --- a/src/applications/diffusion/controller/DiffusionBrowseController.php +++ b/src/applications/diffusion/controller/DiffusionBrowseController.php @@ -183,8 +183,6 @@ abstract class DiffusionBrowseController extends DiffusionController { $ownership = id(new PHUIStatusListView()) ->setUser($viewer); - - foreach ($packages as $package) { $icon = 'fa-list-alt'; $color = 'grey'; diff --git a/src/applications/owners/query/PhabricatorOwnersPackageQuery.php b/src/applications/owners/query/PhabricatorOwnersPackageQuery.php index 8dbb74e528..f2691ea3be 100644 --- a/src/applications/owners/query/PhabricatorOwnersPackageQuery.php +++ b/src/applications/owners/query/PhabricatorOwnersPackageQuery.php @@ -42,6 +42,7 @@ final class PhabricatorOwnersPackageQuery } foreach ($paths as $path) { + $path = (string)$path; $this->controlMap[$repository_phid][$path] = $path; } @@ -277,6 +278,8 @@ final class PhabricatorOwnersPackageQuery * @return list List of controlling packages. */ public function getControllingPackagesForPath($repository_phid, $path) { + $path = (string)$path; + if (!isset($this->controlMap[$repository_phid][$path])) { throw new PhutilInvalidStateException('withControl'); }