Libraries\PError\PError->handleError():352 PHP 8.1.19

explode(): Passing null to parameter #2 ($string) of type string is deprecated

/home/filepedia/public_html/app/Http/Controllers/HomeController.php:352

340
            'name' => $product_arr['translator_name'],
341
            'content' => $product_arr['translator_content'],
342
        ])->decode();
343
344
        $product->rating = [
345
            'total' => $product_arr['rating_total'],
346
            'avg' => $product_arr['rating_avg'],
347
            'id' => $product_arr['rating_id'],
348
            'score' => $product_arr['rating_score'],
349
        ];
350
351
        $product->versions collect([(new ProductVersion)->load(['title' => $product_arr['version_title'], 'content' => $product_arr['version_content']])->decode()]);
352
        $product->platforms collect(explode(', '$product_arr['other_platforms']))->filter(fn ($platform) => $platform != $product_arr['platform'])->unique()->all();
353
354
        unset($product_arr);
355
356
        if ($version !== null && !empty(trim($version))) {
357
            foreach ($product->versions()->all() as $ver) {
358
                if (Str::slugIf($ver->title ?? '') == $version) {
359
                    $version $ver;
360
                    break;
361
                }
362
            }
363
        } else {
364
            $version $product->versions()->first();
365
        }