- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I wonder if this was originally some kind of check to limit the number of attachments - between 1 and 10 is fine, any more then do something else - but the requirement was changed and this is the remnants that are left 'just in case' the requirements come back.
Edit Admin
More likely it was one of those "make the minimum changes possible" situations, as in the case below:
And then the requirement for removing no/some/all entries disappeared, and then the requirement for the other stuff disappeared, so only the if()s remain outside the foreach(). (Removing the if()s would count as making more changes than the minimum possible, so they remain with us.)
Admin
This screams "git merge error" to me.