API getVersion Fix -> Undefined variable: eTagMatches... (#2268)

see https://github.com/cakephp/cakephp/issues/12536
This commit is contained in:
raTmole 2018-10-23 14:58:07 +03:00 committed by Isaac Connor
parent 86b0e4ea18
commit 18850d8779
1 changed files with 3 additions and 0 deletions

View File

@ -1168,6 +1168,9 @@ class CakeResponse {
if ($modifiedSince) {
$timeMatches = strtotime($this->modified()) === strtotime($modifiedSince);
}
if (!isset($etagMatches, $timeMatches)) {
return false;
}
$checks = compact('etagMatches', 'timeMatches');
if (empty($checks)) {
return false;