diff --git a/src/Illuminate/Http/Middleware/Cache.php b/src/Illuminate/Http/Middleware/Cache.php index 9af851365656..2910cdca5bbd 100644 --- a/src/Illuminate/Http/Middleware/Cache.php +++ b/src/Illuminate/Http/Middleware/Cache.php @@ -35,7 +35,7 @@ public function handle($request, Closure $next, $options = []) $options = $parsedOptions; } - if (true === ($options['etag'] ?? false)) { + if (isset($options['etag']) && true === $options['etag']) { $options['etag'] = md5($response->getContent()); }