From b0da8726f311f8fe72df62277443870dcca73824 Mon Sep 17 00:00:00 2001 From: Rello Date: Wed, 8 Sep 2021 21:47:52 +0200 Subject: [PATCH] Type issue in scanner #528 --- CHANGELOG.md | 5 ++++- lib/Controller/ScannerController.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e431c96..3d26c815 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,15 @@ # Changelog All notable changes to the Audio Player project will be documented in this file. - +## 3.3.0 - 2021-09-xx ### Changed - Event dispatcher for Add-ons - getID3 1.9.20-202109010614 - remove non permitted characters #532 +### Fixed +- Type issue in scanner #528 + ## 3.2.1 - 2021-08-20 ### Fixed - dashboard style impact #550 diff --git a/lib/Controller/ScannerController.php b/lib/Controller/ScannerController.php index 21ce9e32..9ed08dd2 100644 --- a/lib/Controller/ScannerController.php +++ b/lib/Controller/ScannerController.php @@ -638,7 +638,7 @@ private function analyze($audio, $getID3, OutputInterface $output = null) $this->logger->debug('Some external storage is not available', array('app' => 'audioplayer')); } else { $handle = $audio->fopen('rb'); - if (@fseek($handle, -24, SEEK_END) === 0) { + if (is_resource($handle) && @fseek($handle, -24, SEEK_END) === 0) { $ThisFileInfo = $getID3->analyze($audio->getPath(), $audio->getSize(), '', $handle); } else { if (!$this->noFseek) {