RSS Feed/News getAutoCompleteResults: array_merge(): Argument #2 must be of type array, null given

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
25,501
Points
823

Reputation:

getAutoCompleteResults isn't checking the return result of getAutoCompleteResult

getAutoCompleteResult has the type signature public function getAutoCompleteResult(Entity $entity,array $options = []): ?array;

But it is used as:
PHP:

Code:
    return array_filter(array_merge(
        [
            'id' => $result->getEntityContentTypeId(),
            'type' => \XF::app()->getContentTypePhrase($type),
        ],
        $handler->getAutoCompleteResult($result, $options)...

Read more

Continue reading...
 
Status
Not open for further replies.
Top