Description
There is a typo in the configuration key for searchResultClassName in the code. The key contains an unintended trailing space ('searchResultClassName ') which leads to incorrect behavior when retrieving the configuration value.
Steps to Reproduce
|
return $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultClassName '] ?? SearchResult::class; |
- Configure the
searchResultClassName in TYPO3_CONF_VARS:
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultClassName'] = \CustomNamespace\CustomSearchResult::class;
- Attempt to use the custom class in the Solr integration.
- The custom class is not used because the incorrect key (
'searchResultClassName ') is being checked.
Expected Behavior
The code should check for the key without the trailing space ('searchResultClassName') and fall back to the default SearchResult::class if not set.
Actual Behavior
The code currently checks for the key with a trailing space ('searchResultClassName '), which causes the custom configuration to be ignored.
Proposed Fix
Replace the following line:
return $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultClassName '] ?? SearchResult::class;
With:
return $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultClassName'] ?? SearchResult::class;
Description
There is a typo in the configuration key for
searchResultClassNamein the code. The key contains an unintended trailing space ('searchResultClassName ') which leads to incorrect behavior when retrieving the configuration value.Steps to Reproduce
ext-solr/Classes/Domain/Search/ResultSet/Result/SearchResultBuilder.php
Line 48 in b6bfad8
searchResultClassNameinTYPO3_CONF_VARS:'searchResultClassName ') is being checked.Expected Behavior
The code should check for the key without the trailing space (
'searchResultClassName') and fall back to the defaultSearchResult::classif not set.Actual Behavior
The code currently checks for the key with a trailing space (
'searchResultClassName '), which causes the custom configuration to be ignored.Proposed Fix
Replace the following line:
With: