It would be better not to assume that the 2nd parameter to simplepie_get is relative to file_directory_path(). The main reason is that you can't use:
simplepie_get($url,simplepie_get_cache_location(),$cache_time);
which means you have to call variable_get('simplepie_cache_location') from your own code.
Comments
Comment #1
Freso commentedHm. I think I agree with you... but. I don't immediately see how to check whether the given path is relative or absolute. I see a few options here:
NULL; that would trigger theelse, which sets the cache location tosimplepie_get_cache_location().For this particular use case, you could use
simplepie_get($url, NULL, $cache_time), I'm also mostly leaning towards replacing the default with that.Comment #2
daph2001 commentedIt's a good solution - I now use NULL.