Invalid if statement in CronFrequencyValidator

Created on 25 July 2024, about 1 month ago
Updated 8 August 2024, about 1 month ago

Problem/Motivation

CronFrequencyValidator has this line:

    // We only want to do this check if the stage belongs to Automatic Updates.
    if (!$event->stage->getType() === 'automatic_updates:unattended') {
      return;
    }

This is a copypasta mistake from when stage types were checked by instanceof.

Proposed resolution

Change it to:

    // We only want to do this check if the stage belongs to Automatic Updates.
    if ($event->stage->getType() !== 'automatic_updates:unattended') {
      return;
    }

This is so straightforward that if tests pass, I'm going to merge it outright.

πŸ› Bug report
Status

Fixed

Version

3.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024