TYPO3-Solr / ext-tika

A TYPO3 CMS extension that provides Apache Tika functionality
GNU General Public License v3.0
6 stars 29 forks source link

[BUG] trim() expects string, not null in Tika AppService -> shellOutputToArray function #195

Closed bigahuna closed 2 years ago

bigahuna commented 2 years ago

Describe the bug

Index Queue Initialization: When adding a sys_file_storage to the index queue, the following error is shown (The error is shown in the backend and in the log)

Core: Exception handler (CLI): Uncaught TYPO3 Exception: trim(): Argument #1 ($string) must be of type string, null given | TypeError thrown in file /var/www/xyz.de/typo3/public/typo3conf/ext/tika/Classes/Service/Tika/AppService.php in line 250

To Reproduce

Steps to reproduce the behavior:

  1. Apache Solr Module in TYPO3 backend
  2. Click Index Queue and select a pageroot in the pagetree list
  3. select a sys_file_storage
  4. click "Queue selected content for Indexing"
  5. now the error is shown

Expected behavior A success message instead of the error.

Screenshots

step_1

step_2

Used versions (please complete the following information):

I can create a pull request that checks if the var $value is null before passing it to the trim() function in /ext/tika/Classes/Service/Tika/AppService.php in line 250