Parcourir la source

Merge pull request #1154 from xiaohuilam/patch-1

修复Bug: 模型 casts object 时,Grid column 即使自定义 ->display() 依然报错
Jiang Qinghua il y a 4 ans
Parent
commit
34ca62eda8
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      src/Support/Helper.php

+ 3 - 0
src/Support/Helper.php

@@ -844,6 +844,9 @@ class Helper
      */
     public static function htmlEntityEncode($item)
     {
+        if (is_object($item)) {
+            return $item;
+        }
         if (is_array($item)) {
             array_walk_recursive($item, function (&$value) {
                 $value = htmlentities($value);