XF 2.0 Introducing new Search Source handler

wasif

Member
I'm trying to introduce a new search source handler, I have created a listener for "search_source_setup" but i'm getting this error on search pages

ErrorException: [E_RECOVERABLE_ERROR] Argument 2 passed to **********::searchSource() must be an instance of XF\Search\Source\AbstractSource, null given

Please guide me in the right direction.
 
Drop the type hint for the source argument. The code incorrectly indicated it should be there. That was just meant to reference the type of object you should be returning.
 
Top Bottom