VulcanPhp\PrettyError\PrettyError->handleError():99 PHP 8.2.25

strrpos(): Passing null to parameter #1 ($haystack) of type string is deprecated

/home/movtv/public_html/app/Http/Controllers/Explore.php:99

                                    
87
            ->setData($viewModel->cut('content'));
88
89
        return view('explore', [
90
            'heading' => translate('Explore:') . ' <u>' $title '</u> ' translate(($type == 'movie' 'Movies' 'TV Series')),
91
            'paginator' => $pagination
92
        ]);
93
    }
94
95
    public function people($slug)
96
    {
97
        $cache  cache('tmdb.home');
98
        $client TmdbClient::create('movie');
99
        $result $client->request('person/' substr($slugstrrpos($slug'-') + 1), ['append_to_response' => 'combined_credits']);;
100
101
        $viewModel = new TmdbCollection(
102
            new GenreCollection(
103
                $cache->load('movie.genres', fn () => $client->getGenre())
104
            ),
105
            [
106
                'movie' => array_filter($result['combined_credits']['cast'] ?? [], fn ($media) => $media['media_type'] == 'movie'),
107
            ]
108
        );
109
110
        $client->setType('tv');
111
112
        $viewModel->setGenreCollection(