findLocalFile references non existant $files variable

Created on 29 March 2023, over 1 year ago
    $fids = $this->fileStorage->getQuery()
      ->condition('uri', '%' . $imagePath . '%', 'LIKE')
      ->range(0, 1)
      ->execute();

    if ($fids) {
      return $this->fileStorage->load(reset($files));
    }

Seems it should be

    $fids = $this->fileStorage->getQuery()
      ->condition('uri', '%' . $imagePath . '%', 'LIKE')
      ->range(0, 1)
      ->execute();

    if ($fids) {
      return $this->fileStorage->load(reset($fids));
    }
🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇪🇸Spain pcambra Asturies

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

Comments & Activities

Production build 0.71.5 2024