Skip to content
Snippets Groups Projects
Commit 53fd47b5 authored by Chris Hallberg's avatar Chris Hallberg Committed by Demian Katz
Browse files

Fix unset driver in similar items channel provider.

parent 2077f725
No related merge requests found
......@@ -162,7 +162,10 @@ class SimilarItems extends AbstractChannelProvider
}
// If the search results did not include the object we were looking for,
// we need to fetch it from the search service:
if (empty($channels) && is_object($driver) && $channelToken !== null) {
if (empty($channels)
&& is_object($driver ?? null)
&& $channelToken !== null
) {
$driver = $this->searchService->retrieve(
$driver->getSourceIdentifier(), $channelToken
)->first();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment