silverstripe/silverstripe-framework — pull request #2019 by halkyon (2013-05-27 10:34:57+00:00)
Title: BUG Non-object error attempting to upload file to assets root

This fixes a regression in UploadField caused by 22c7bbfcd42a8785da4d443d5573981b2ee1d220

UploadField assumes a Folder record exists, but if you're
uploading a file to the assets root, a non-object error is
thrown instead.

Use ASSETS_PATH as the upload path when a Folder->getFullPath()
isn't available.