fixed bug where attachments which were upload to a page before the redmine installation was updated to 2.x caused a crash.