close
轉自 http://wordpress.org/support/topic/plugin-yoast-breadcrumbs-warning-array_slice
PHP出現 WARNING: array_slice() expects parameter 1 to be array 的問題
解法是在array_slice()之前先去跑is_array()的判斷,把不是array的情況過濾掉
--
Not sure where you're getting sociable.php from phorbidden but this fixed the issue for me:
Open: yoast-posts.php
Find:$items = array_slice($rss->items, 0, 2)
Replace with:$items = is_array($rss->items) ? array_slice($rss->items, 0, 2) : '';
That, at least stops the code erroring out..
全站熱搜
留言列表