Fix issue with Probe returning local baseurl for probed Twitter accounts

This commit is contained in:
Hypolite Petovan 2020-06-06 14:32:51 -04:00
parent 5f18d27b0b
commit 2233fa0e46

View file

@ -441,7 +441,7 @@ class Probe
} }
} }
if (!empty(self::$baseurl)) { if (empty($data['baseurl']) && !empty(self::$baseurl)) {
$data['baseurl'] = self::$baseurl; $data['baseurl'] = self::$baseurl;
} }
@ -1730,6 +1730,8 @@ class Probe
*/ */
private static function twitter($uri) private static function twitter($uri)
{ {
self::$baseurl = '';
if (preg_match('=(.*)@twitter.com=i', $uri, $matches)) { if (preg_match('=(.*)@twitter.com=i', $uri, $matches)) {
$nick = $matches[1]; $nick = $matches[1];
} elseif (preg_match('=https?://twitter.com/(.*)=i', $uri, $matches)) { } elseif (preg_match('=https?://twitter.com/(.*)=i', $uri, $matches)) {