I'm having a hard time with PHP formatting. :P
In a function I have these strings and $cache1 path is output properly (wordpress absolute upload path + /json/dailymile/BLABLA.json
$url1 = "http://api.dailymile.com/people/XXXXX/entries.json";
$cache1 = $upload_dir['basedir'].'/json/dailymile/'.sha1($url1).'.json';
Then I have a SIMILAR (if not the same) case but only God knows why, $cache2 returns just /json/instagram/BLABLA.json without wordpress upload path before.
$url2 = 'https://api.instagram.com/v1/users/'.$user_id.'/media/recent/?access_token='.$token.'&count='.$count;
$cache2 = $upload_dir['basedir'].'/json/instagram/'.sha1($url2).'.json';
These two snippets are in the same file and the top of this file I have <?php $upload_dir = wp_upload_dir(); ?>.
Why the second snippet doesn't return the WP upload dir before /json/instagram/BLABLA.json ?
var_dump($upload_dir);right before the second snippet starts.