-
-
Notifications
You must be signed in to change notification settings - Fork 259
Open
Description
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
searchResultClassNameinTYPO3_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;Metadata
Metadata
Assignees
Labels
No labels