Skip to content

[BUG]: Fix Typo in searchResultClassName Configuration Key  #4225

@BreathCodeFlow

Description

@BreathCodeFlow

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;

  1. Configure the searchResultClassName in TYPO3_CONF_VARS:
    $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultClassName'] = \CustomNamespace\CustomSearchResult::class;
  2. Attempt to use the custom class in the Solr integration.
  3. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions