Handle Missing $data['invalidations'][0] in Invalidation Check

Created on 29 October 2024, 27 days ago

Problem/Motivation

The problem is that if $data['invalidations'] does not have an element at index 0, the token replacement will not work, even if there are other elements in $data['invalidations'].

Steps to reproduce

  • Add an HTTP Bundled Purger -> then set the Type to Tag -> set the body to [invalidations:separated_comma]
  • Add an HTTP Bundled Purger again -> then set the Type to Path -> set the body to [invalidations:separated_comma]

Proposed resolution

We need to use reset($data['invalidations']) instead of $data['invalidations'][0] for the condition.

🐛 Bug report
Status

Active

Version

3.6

Component

Code

Created by

🇻🇳Vietnam hoanglv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024