From: Mikael Nordfeldth Date: Tue, 7 Jul 2015 17:30:14 +0000 (+0200) Subject: Don't statically call Validate functions X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=edef6f929a31b5662441364db2452aa98c2bf910;p=quix0rs-gnu-social.git Don't statically call Validate functions --- diff --git a/lib/activityutils.php b/lib/activityutils.php index d4c01232ec..f3383efda5 100644 --- a/lib/activityutils.php +++ b/lib/activityutils.php @@ -281,19 +281,20 @@ class ActivityUtils static function validateUri($uri) { // Check mailto: URIs first + $validate = new Validate(); if (preg_match('/^mailto:(.*)$/', $uri, $match)) { - return Validate::email($match[1], common_config('email', 'check_domain')); + return $validate->email($match[1], common_config('email', 'check_domain')); } - if (Validate::uri($uri)) { + if ($validate->uri($uri)) { return true; } // Possibly an upstream bug; tag: URIs aren't validated properly // unless you explicitly ask for them. All other schemes are accepted // for basic URI validation without asking. - if (Validate::uri($uri, array('allowed_scheme' => array('tag')))) { + if ($validate->uri($uri, array('allowed_scheme' => array('tag')))) { return true; }