aboutsummaryrefslogtreecommitdiffstats
path: root/include/socgraph.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-25 15:36:18 -0800
committerfriendica <info@friendica.com>2013-01-25 15:36:18 -0800
commit318d75a86a3cc4f5a4dcf1278c9a8236c24ac12a (patch)
treec37b24bb68cb87cd373b2d0acdb32fab299a4072 /include/socgraph.php
parenta8575199af9c1697af49ff8a4f15eb904a1773d5 (diff)
downloadvolse-hubzilla-318d75a86a3cc4f5a4dcf1278c9a8236c24ac12a.tar.gz
volse-hubzilla-318d75a86a3cc4f5a4dcf1278c9a8236c24ac12a.tar.bz2
volse-hubzilla-318d75a86a3cc4f5a4dcf1278c9a8236c24ac12a.zip
poco debugging cont.
Diffstat (limited to 'include/socgraph.php')
-rw-r--r--include/socgraph.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/socgraph.php b/include/socgraph.php
index 081927dcc..dd7fa90d4 100644
--- a/include/socgraph.php
+++ b/include/socgraph.php
@@ -31,8 +31,10 @@ function poco_load($xchan = null,$url = null) {
}
}
- if(! $url)
+ if(! $url) {
+ logger('poco_load: no url');
return;
+ }
$url = $url . '?fields=displayName,hash,urls,photos' ;
@@ -41,17 +43,20 @@ function poco_load($xchan = null,$url = null) {
$s = z_fetch_url($url);
- logger('poco_load: returns ' . print_r($s,true), LOGGER_DATA);
- if(! $s['success'])
+ if(! $s['success']) {
+ logger('poco_load: returns ' . print_r($s,true));
return;
+ }
$j = json_decode($s['body'],true);
logger('poco_load: ' . print_r($j,true),LOGGER_DATA);
- if(! x($j,'entry') && is_array($j['entry']))
+ if(! ((x($j,'entry')) && (is_array($j['entry'])))) {
+ logger('poco_load: no entries');
return;
+ }
$total = 0;
foreach($j['entry'] as $entry) {
@@ -87,8 +92,10 @@ function poco_load($xchan = null,$url = null) {
}
}
- if((! $name) || (! $profile_url) || (! $profile_photo) || (! $hash) || (! $address))
+ if((! $name) || (! $profile_url) || (! $profile_photo) || (! $hash) || (! $address)) {
+ logger('poco_load: missing data');
continue;
+ }
$x = q("select xchan_hash from xchan where xchan_hash = '%s' limit 1",
dbesc($hash)