ソースを参照

default on string value if json decode fails

tags/0.1.11
Robin Thoni 9年前
コミット
853b9d9d86
1個のファイルの変更3行の追加0行の削除
  1. 3
    0
      src/Utils/LuRoute.php

+ 3
- 0
src/Utils/LuRoute.php ファイルの表示

70
             try
70
             try
71
             {
71
             {
72
                 $json = json_decode($value, true);
72
                 $json = json_decode($value, true);
73
+                if (is_null($json)) {
74
+                    $json = $value . "";
75
+                }
73
                 $typedValue = call_user_func_array(array($class->getName(), "jsonDeserialize"), array($json));
76
                 $typedValue = call_user_func_array(array($class->getName(), "jsonDeserialize"), array($json));
74
             }
77
             }
75
             catch (LuDboDeserializeException $e)
78
             catch (LuDboDeserializeException $e)

読み込み中…
キャンセル
保存