瀏覽代碼

:construction: currency

jqh 4 年之前
父節點
當前提交
edf2cf8017
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Form/Field/Currency.php

+ 1 - 1
src/Form/Field/Currency.php

@@ -52,7 +52,7 @@ class Currency extends Text
      */
     protected function prepareInputValue($value)
     {
-        return str_replace(',', '', $value);
+        return is_string($value) ? str_replace(',', '', $value) : $value;
     }
 
     /**