From 9282e08001e4c50866d593e4849d6ff0ee5bef73 Mon Sep 17 00:00:00 2001 From: Serhey Dolgushev Date: Fri, 17 Jul 2020 17:02:16 -0400 Subject: [PATCH 1/2] LegacyStorageFileRowReader: handle the case when statement->fetch returns false --- .../FileLister/FileRowReader/LegacyStorageFileRowReader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eZ/Bundle/EzPublishIOBundle/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php b/eZ/Bundle/EzPublishIOBundle/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php index 9a52c339e2..bb3e0248f3 100644 --- a/eZ/Bundle/EzPublishIOBundle/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php +++ b/eZ/Bundle/EzPublishIOBundle/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php @@ -42,7 +42,7 @@ final public function getRow() { $row = $this->statement->fetch(); - return $this->prependMimeToPath($row['filename'], $row['mime_type']); + return is_array($row) ? $this->prependMimeToPath($row['filename'], $row['mime_type']) : null; } final public function getCount() From ff086c72a022493f1d830363239be04efb73866f Mon Sep 17 00:00:00 2001 From: Serhey Dolgushev Date: Tue, 29 Sep 2020 13:51:00 -0400 Subject: [PATCH 2/2] Update eZ/Bundle/EzPublishIOBundle/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php Co-authored-by: Andrew Longosz --- .../FileLister/FileRowReader/LegacyStorageFileRowReader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eZ/Bundle/EzPublishIOBundle/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php b/eZ/Bundle/EzPublishIOBundle/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php index bb3e0248f3..408d34749c 100644 --- a/eZ/Bundle/EzPublishIOBundle/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php +++ b/eZ/Bundle/EzPublishIOBundle/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php @@ -42,7 +42,7 @@ final public function getRow() { $row = $this->statement->fetch(); - return is_array($row) ? $this->prependMimeToPath($row['filename'], $row['mime_type']) : null; + return false !== $row ? $this->prependMimeToPath($row['filename'], $row['mime_type']) : null; } final public function getCount()