Fix local-clobbering iterators in phabricator/
Summary: These are the issues identified by the linter in D2052. I don't think any cause bugs, but they are all reasonable errors to raise and the linter correctly detected that they are suspicious. Test Plan: Mostly inspection. Reviewers: vrana, btrahan Reviewed By: vrana CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D2053
This commit is contained in:
@@ -61,9 +61,9 @@ final class DiffusionHomeController extends DiffusionController {
|
||||
$repository = new PhabricatorRepository();
|
||||
|
||||
$repositories = $repository->loadAll();
|
||||
foreach ($repositories as $key => $repository) {
|
||||
if (!$repository->isTracked()) {
|
||||
unset($repositories[$key]);
|
||||
foreach ($repositories as $key => $repo) {
|
||||
if (!$repo->isTracked()) {
|
||||
unset($repo[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user