You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
niceguy-php
changed the title
更新微信文章的时候MatialEasyWeChat\Material,如果设置了
更新微信文章的时候MatialEasyWeChat\Material,如果设置了show_pic_cover和content_source_url不会生效
Jul 27, 2016
我用的环境
PHP 版本:
overtrue/wechat 版本:3.0
问题及现象
更新微信文章的时候MatialEasyWeChat\Material,如果设置了show_pic_cover和content_source_url不会生效,修改代码如下即可修复(----包括的内容),还请官方及时处理,以免别人遇到同样问题
描述你的问题现象,报错贴截图粘贴或者贴具体信息,提供必要的代码段
public function updateArticle($mediaId, $article, $index = 0)
{
$params = [
'media_id' => $mediaId,
'index' => $index,
'articles' => isset($article['title']) ? $article : (isset($article[$index]) ? $article[$index] : []),
];
//--------------------fix by yyx
$article instanceof Article && $params['articles'] = $article->only([
'title', 'thumb_media_id', 'author', 'digest',
'show_cover_pic', 'content', 'content_source_url',
]);
//---------------------------------------
The text was updated successfully, but these errors were encountered: