From 18850d8779ebff0ce65e282189afb3e74531d367 Mon Sep 17 00:00:00 2001 From: raTmole Date: Tue, 23 Oct 2018 14:58:07 +0300 Subject: [PATCH] API getVersion Fix -> Undefined variable: eTagMatches... (#2268) see https://github.com/cakephp/cakephp/issues/12536 --- web/api/lib/Cake/Network/CakeResponse.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/api/lib/Cake/Network/CakeResponse.php b/web/api/lib/Cake/Network/CakeResponse.php index 21dfd7b2e5..982398e87c 100644 --- a/web/api/lib/Cake/Network/CakeResponse.php +++ b/web/api/lib/Cake/Network/CakeResponse.php @@ -1168,6 +1168,9 @@ public function checkNotModified(CakeRequest $request) { if ($modifiedSince) { $timeMatches = strtotime($this->modified()) === strtotime($modifiedSince); } + if (!isset($etagMatches, $timeMatches)) { + return false; + } $checks = compact('etagMatches', 'timeMatches'); if (empty($checks)) { return false;