src/Viserio/Component/Pagination/AbstractPaginator.php
private function secureInput(array $query): array
    {
        $secure = static function (&$v): void {
            if (! \is_string($v) && ! \is_numeric($v)) {
                $v = '';
            } elseif (\mb_strpos($v, "\0") !== false) {
                $v = '';
            } elseif (! \mb_check_encoding($v, 'UTF-8')) {
                $v = '';
            }
        };

        \array_walk_recursive($query, $secure);

        return $query;
    }
private function secureInput(array $query): array
    {
        $secure = static function (&$v): void {
            if (! \is_string($v) && ! \is_numeric($v)) {
                $v = '';
            } elseif (\mb_strpos($v, "\0") !== false) {
                $v = '';
            } elseif (! \mb_check_encoding($v, 'UTF-8')) {
                $v = '';
            }
        };

        \array_walk_recursive($query, $secure);

        return $query;
    }
At least check if the input string does not have null-byte
and is a UTF-8 valid string.

@param array $query

@return array