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;
    }