If case in checksumExists() will never be reached.

Created on 24 August 2023, 10 months ago
Updated 21 September 2023, 9 months ago

Problem/Motivation

Currently, checksumExists() is only ever called inside 'canSave()', while 'canSave()' is only every called inside MediaUniqueChecksumValidator's 'validate()' method. BUT during validation the media entity isn't created, hence the id is ALWAYS NULL, making the mid-check obsolete:

    if ($mid !== NULL) {
      $query->condition('mid', $mid, '!=');
    }

Steps to reproduce

Proposed resolution

Remove the mid check.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Grevil

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

Comments & Activities

Production build 0.69.0 2024