dever 6 年之前
父节点
当前提交
35501dbc2c
共有 1 个文件被更改,包括 8 次插入3 次删除
  1. 8 3
      main/src/Journal.php

+ 8 - 3
main/src/Journal.php

@@ -319,7 +319,7 @@ class Journal extends Core
     public function read()
     {
         if (!$this->data['uid']) {
-            Dever::alert('错误的用户信息');
+            //Dever::alert('错误的用户信息');
         }
         # 验证是否可以阅读
         $id = $this->check();
@@ -368,9 +368,14 @@ class Journal extends Core
 
         if ($info['type'] == 1 && $info['text']) {
             $info['text'] = Dever::array_decode($info['text']);
-            if (isset($info['text']['bgcolor_type']) && $info['text']['bgcolor_type'] == 2) {
-                $info['text']['bgcolor'] = '';
+            if ($info['text']) {
+                foreach ($info['text'] as $k => $v) {
+                    if (isset($info['text'][$k]['bgcolor_type']) && $info['text'][$k]['bgcolor_type'] == array(2)) {
+                        $info['text'][$k]['bgcolor'] = '';
+                    }
+                }
             }
+            
         } else {
             unset($info['text']);
         }