Skip to content

Commit

Permalink
Fix preg_split deprecated null param limit on CakeResponse::checkNotM…
Browse files Browse the repository at this point in the history
…odified
  • Loading branch information
diegosurita committed Jan 22, 2024
1 parent c033667 commit 5411579
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Cake/Network/CakeResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,11 @@ public function checkNotModified(CakeRequest $request) {
$ifNoneMatchHeader = $request->header('If-None-Match');
$etags = array();
if (is_string($ifNoneMatchHeader)) {
$etags = preg_split('/\s*,\s*/', $ifNoneMatchHeader, null, PREG_SPLIT_NO_EMPTY);
$etags = preg_split(
pattern: '/\s*,\s*/',
subject: $ifNoneMatchHeader,
flags: PREG_SPLIT_NO_EMPTY
);
}
$modifiedSince = $request->header('If-Modified-Since');
$checks = array();
Expand Down

0 comments on commit 5411579

Please sign in to comment.