Skip to content

Commit

Permalink
Update Contents.php
Browse files Browse the repository at this point in the history
修复在插件调用执行config() 方法时,不存在 text  key 时有警告提醒
  • Loading branch information
visamz committed May 30, 2015
1 parent 65637a3 commit 2aaaf9d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions var/Widget/Abstract/Contents.php
Original file line number Diff line number Diff line change
Expand Up @@ -696,9 +696,11 @@ public function filter(array $value)
}

/** 处理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);
}
}

/** 生成聚合链接 */
Expand Down

0 comments on commit 2aaaf9d

Please sign in to comment.