• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 Introducing new Search Source handler

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.


XenForo developer
Staff member
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.