From 2aaaf9df0550be6bf08f009f93dadb43fce3559f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BE=BD=E9=A3=9E?= <zwxiang@qq.com>
Date: Sat, 30 May 2015 19:53:03 +0800
Subject: [PATCH] Update Contents.php
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

修复在插件调用执行config() 方法时,不存在 text  key 时有警告提醒
---
 var/Widget/Abstract/Contents.php | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/var/Widget/Abstract/Contents.php b/var/Widget/Abstract/Contents.php
index 08e24126..428c88ad 100644
--- a/var/Widget/Abstract/Contents.php
+++ b/var/Widget/Abstract/Contents.php
@@ -696,9 +696,11 @@ class Widget_Abstract_Contents extends Widget_Abstract
         }
 
         /** 处理Markdown **/
-        $value['isMarkdown'] = (0 === strpos($value['text'], '<!--markdown-->'));
-        if ($value['isMarkdown']) {
-            $value['text'] = substr($value['text'], 15);
+        if (isset($value['text'])) {
+            $value['isMarkdown'] = (0 === strpos($value['text'], '<!--markdown-->'));
+            if ($value['isMarkdown']) {
+                $value['text'] = substr($value['text'], 15);
+            }
         }
 
         /** 生成聚合链接 */