Problem/Motivation
When using the search as an anonymous user the following error is triggered:
TypeError: str_replace(): Argument #2 ($replace) must be of type array|string, int given in str_replace() (line 293
of /app/htdocs/web/modules/contrib/ai_search_block/src/AiSearchBlockHelper.php).This is because of the removal of the casting in this commit.
Steps to reproduce
1. Add search block
2. Do a search as an anonymous user
3. An error message will be shown in the response output and browser console.
Proposed resolution
Add casting back
Issue fork ai_search_block-3555705
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jonas139 commentedComment #6
lammensj commented