fix: handle null parameter in str_replace to resolve deprecation warning in ClientController
Some checks are pending
Docker Build and Publish / build (push) Waiting to run

This commit is contained in:
xboard 2025-01-16 22:04:40 +08:00
parent 94ecd10704
commit 2c4a3b520f

View File

@ -166,7 +166,10 @@ class ClientController extends Controller
private function getFilterArray(?string $filter): ?array private function getFilterArray(?string $filter): ?array
{ {
return mb_strlen((string) $filter) > 20 ? null : if ($filter === null) {
return null;
}
return mb_strlen($filter) > 20 ? null :
explode('|', str_replace(['|', '', ','], '|', $filter)); explode('|', str_replace(['|', '', ','], '|', $filter));
} }