瀏覽代碼

don't try to truncate non-strings

object-id-column
Sadposter 4 年之前
父節點
當前提交
cb99cfcc65
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      lib/pleroma/user.ex

+ 1
- 1
lib/pleroma/user.ex 查看文件

@@ -175,7 +175,7 @@ defmodule Pleroma.User do
end

defp truncate_if_exists(params, key, max_length) do
if Map.has_key?(params, key) do
if Map.has_key?(params, key) and is_binary(params[key]) do
{value, _chopped} = String.split_at(params[key], max_length)
Map.put(params, key, value)
else


Loading…
取消
儲存