{"comment":{"url":"https://api.github.com/repos/pfsense/pfsense/comments/10133158","html_url":"https://github.com/pfsense/pfsense/commit/309162b96d6ad0db09c132cc0aabc890bfe1909f#commitcomment-10133158","id":10133158,"user":{"login":"phil-davis","id":1535615,"avatar_url":"https://avatars.githubusercontent.com/u/1535615?v=3","gravatar_id":"","url":"https://api.github.com/users/phil-davis","html_url":"https://github.com/phil-davis","followers_url":"https://api.github.com/users/phil-davis/followers","following_url":"https://api.github.com/users/phil-davis/following{/other_user}","gists_url":"https://api.github.com/users/phil-davis/gists{/gist_id}","starred_url":"https://api.github.com/users/phil-davis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil-davis/subscriptions","organizations_url":"https://api.github.com/users/phil-davis/orgs","repos_url":"https://api.github.com/users/phil-davis/repos","events_url":"https://api.github.com/users/phil-davis/events{/privacy}","received_events_url":"https://api.github.com/users/phil-davis/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"309162b96d6ad0db09c132cc0aabc890bfe1909f","created_at":"2015-03-11T01:21:23Z","updated_at":"2015-03-11T01:21:23Z","body":"This looks(and looked) odd. $oldvipif is the array key managed by the PHP foreach loop.\r\nBut actually in all cases the code is overwriting it with some calculation from $oldvipar['interface']\r\nI guess it works - I think PHP is OK managing the internal array pointer of the foreach loop even if the code inside the loop messes with the current key => value pair. But it looks odd to me.\r\nWhy even have:\r\nforeach ($oldvips as $oldvipif => $oldvipar)\r\njust this would work here and be less confusing to read:\r\nforeach ($oldvips as $oldvipar)\r\nbecause the $oldvipif key value is never used anyway."}}