HTTP:add_cache_headers() - don't throw warning when not passed

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64368 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-10-16 05:29:32 +00:00
parent 77bb01c253
commit 344d6e173c

View File

@ -280,7 +280,7 @@ class HTTP {
*/
static function add_cache_headers($body = null) {
// Validate argument
if(!($body instanceof HTTPResponse)) {
if($body && !($body instanceof HTTPResponse)) {
user_error("HTTP::add_cache_headers() must be passed an HTTPResponse object", E_USER_WARNING);
$body = null;
}