jacklenk
Member
Posted 3 years ago #
I just installed Yoast on WP 2.7.0 with Modularity theme from Graph Paper Press. It seems to work okay in the posts but on my WP Dashboard I get this message in the Yoast box:
Warning: array_slice() expects parameter 1 to be array, null given in /data/13/0/5/86/5249/user/5360/htdocs/home/wp-content/plugins/sociable/yoast-posts.php on line 43
- No items
Any ideas? Please advise.
Thanks,
Jack
cobaltwolf
Member
Posted 3 years ago #
No problems under WP 2.7. However, I started getting a similar message after I upgraded my local copy of WordPress to 2.7.1 (I always test WP locally before doing any updates on my live site):
Warning: array_slice() expects parameter 1 to be array, null given in D:\xampp\htdocs\clubda\wp-content\plugins\sociable\yoast-posts.php on line 43
No items
From what I could see, lines 42-43 of yoast-posts.php deal with fetching rss feeds from feeds.feedburner.com/joostdevalk. Should I worry about this or would it be OK to update my live site to 2.7.1?
stanilund
Member
Posted 3 years ago #
Could there be something wrong in rss.php in the includes dir, in the function fetch_rss(url)? The function does not return anything! Made some testing:`include_once(ABSPATH . WPINC . '/rss.php');
$rss = fetch_rss('http://feeds.feedburner.com/joostdevalk');
if ($rss == '') {
echo '
Flödet är tomt
';
}else if ($rss == 0){
echo '
Flödet är noll
';
}else{
$items = array_slice($rss->items, 0, 2);
}
`
The url is correct - it works when I paste it into my beowser.