UnionOfRAD/lithium — pull request #310 by Tomen (2012-02-03 07:03:57+00:00)
Title: Add sanity check in Media::asset()

I had a problem when i used Media::asset() in a way that was propably not originally intended. I wanted to use it to get the base path to the images directory and pass this path to JavaScript. Basically what i did is this:

This produces a NOTICE in PHP. I added a sanity check in Media::asset() that prevents this Notice. From what i understand, this should not have side-effects.