$uid = local_user();
- $a = get_app();
+ $a = \get_app();
$counter = intval($_REQUEST['counter']);
$friends = json_decode(PConfig::get($uid, 'ostatus', 'legacy_friends'));
+ if (empty($friends)) {
+ $friends = [];
+ }
+
$total = sizeof($friends);
if ($counter >= $total) {
$o .= '<p>' . $counter . '/' . $total . ': ' . $url;
- $curlResult = Probe::uri($url);
- if ($curlResult['network'] == Protocol::OSTATUS) {
+ $probed = Probe::uri($url);
+ if ($probed['network'] == Protocol::OSTATUS) {
$result = Contact::createFromProbe($uid, $url, true, Protocol::OSTATUS);
if ($result['success']) {
$o .= ' - ' . L10n::t('success');