Deleting folder under filelist throw exception

Issue #51 closed
Alexander Grein created an issue

To reproduce:

  • install fs_media_gallery 2.0.1 under TYPO3 9.5
  • create a new folder under filelist
  • delete the previous created folder
 (1/2) Doctrine\DBAL\Exception\SyntaxErrorException 
An exception occurred while executing 'SELECT `uid`, `pid`, `title`, `type`, `hidden` FROM `sys_file_collection` WHERE (`storage` = ?) AND (`folder` = ?) AND (`pid` IN ()) AND (`sys_file_collection`.`deleted` = 0)' with params [1, "\/global\/blub\/"]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) AND (`sys_file_collection`.`deleted` = 0)' at line 1

Comments (7)

  1. Alexander Grein reporter

    I found a solution:

    Change line 233 of Classes/Service/Utility.php to:

    } elseif (is_array($pids) && count($pids) > 0) {

    Because $pids could be an empty array and this is currently not concerned.

  2. Log in to comment