X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FOStatus%2FOStatusPlugin.php;h=3fdfdaab9e467071c8fe3144dd14c143f23cf6e6;hb=b3da5bdaa35dee68225a316878647cc4530a748c;hp=1750016ace15cb0e71018e2c4e3743c471101c58;hpb=95f991cff33d3e4ed1c36d9de0b7b541ab28eec0;p=quix0rs-gnu-social.git diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index 1750016ace..3fdfdaab9e 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -271,8 +271,8 @@ class OStatusPlugin extends Plugin PREG_OFFSET_CAPTURE); if ($result === false) { common_log(LOG_ERR, __METHOD__ . ': Error parsing webfinger IDs from text (preg_last_error=='.preg_last_error().').'); - } else { - common_debug(sprintf('Found %i matches for WebFinger IDs: %s', count($wmatches), _ve($wmatches))); + } elseif (count($wmatches)) { + common_debug(sprintf('Found %d matches for WebFinger IDs: %s', count($wmatches), _ve($wmatches))); } return $wmatches[1]; } @@ -293,8 +293,8 @@ class OStatusPlugin extends Plugin PREG_OFFSET_CAPTURE); if ($result === false) { common_log(LOG_ERR, __METHOD__ . ': Error parsing profile URL mentions from text (preg_last_error=='.preg_last_error().').'); - } else { - common_debug(sprintf('Found %i matches for profile URL mentions: %s', count($wmatches), _ve($wmatches))); + } elseif (count($wmatches)) { + common_debug(sprintf('Found %d matches for profile URL mentions: %s', count($wmatches), _ve($wmatches))); } return $wmatches[1]; } @@ -349,7 +349,7 @@ class OStatusPlugin extends Plugin foreach (self::extractUrlMentions($text) as $wmatch) { list($target, $pos) = $wmatch; - $schemes = array('http', 'https'); + $schemes = array('https', 'http'); foreach ($schemes as $scheme) { $url = "$scheme://$target"; $this->log(LOG_INFO, "Checking profile address '$url'");