silverstripe/silverstripe-framework — pull request #2903 by tractorcow (2014-02-27 01:28:18+00:00)
Title: BUG Fix issues with uploading to /assets

If you have an uploadfield with ->setFolderName('/') then various parts of the system fail to respond correctly.

* `UploadField::fileexists` crashes with an error from calling getFilename on a null $folder variable.
* `Upload::load` mistakenly interprets `/` as the site root, rather than the assets root, and attemps to save the file outside of the assets folder.

This provides an alternative solution to https://github.com/silverstripe/silverstripe-framework/pull/2902 which encountered a similar problem.