From 30815e0c5799cdf5d79330f126eba922a375f0a8 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 25 Jan 2015 00:38:38 -0800 Subject: don't set a rating of 1 on old sites that report poco rating as an array. Just set it to 0. It will be fixed whenever they upgrade. --- include/socgraph.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/socgraph.php') diff --git a/include/socgraph.php b/include/socgraph.php index 15ef480f6..5aa72f0be 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -119,7 +119,7 @@ function poco_load($xchan = '',$url = null) { $name = $entry['displayName']; $hash = $entry['hash']; - $rating = ((array_key_exists('rating',$entry)) ? intval($entry['rating']) : 0); + $rating = ((array_key_exists('rating',$entry) && (! is_array($entry['rating']))) ? intval($entry['rating']) : 0); $rating_text = ((array_key_exists('rating_text',$entry)) ? escape_tags($entry['rating_text']) :''); if(x($entry,'urls') && is_array($entry['urls'])) { -- cgit v1.2.3