Return 500 if cache fails and flickr lookup fails
Fix PHP notice due to unset variable