simplepie_get $cache_location parameter should be what's returned from simplepie_get_cache_location()
daph2001 - May 17, 2009 - 19:30
| Project: | SimplePie Core |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
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:
<?php
simplepie_get($url,simplepie_get_cache_location(),$cache_time);
?>which means you have to call variable_get('simplepie_cache_location') from your own code.

#1
Hm. 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.#2
It's a good solution - I now use NULL.