From b3da5bdaa35dee68225a316878647cc4530a748c Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 1 May 2017 10:34:51 +0200 Subject: [PATCH] Debugging log fix. --- plugins/OStatus/OStatusPlugin.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index 1f76b56a20..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]; }