mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
77bb01c253
commit
344d6e173c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user