diff --git a/composer.json b/composer.json index b6ea387..cf97a68 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ ], "require": { "php": "^7.2 || ^8.0", - "psr/http-message": "^1.0", + "psr/http-message": "^1.1 || ^2.0", "psr/http-server-middleware": "^1.0" }, "require-dev": { diff --git a/src/CacheProvider.php b/src/CacheProvider.php index e2381cb..dc8a518 100644 --- a/src/CacheProvider.php +++ b/src/CacheProvider.php @@ -15,7 +15,6 @@ use function gmdate; use function in_array; use function is_integer; -use function is_null; use function strtotime; use function time; @@ -43,7 +42,7 @@ public function allowCache( } $headerValue = $type; if ($maxAge || is_integer($maxAge)) { - if (!is_integer($maxAge) && !is_null($maxAge)) { + if (!is_integer($maxAge) && $maxAge !== null) { $maxAge = strtotime($maxAge) - time(); } $headerValue = $headerValue.', max-age='.$maxAge;