WordPress/WordPress — pull request #39 by simion314 (2013-07-18 18:02:23+00:00)
Title: Update post.php

The old way of checking for the validity of an attachment id was calling a function that does a lot of extra stuff, builds an html, uses a few other functions and if one of those extra is not working right then it fails. This solution is simple and if an extra check is needed here then we should add that too and no longedr use that old code