From bfbc74cd01d3442532b2d750a134fd912748d242 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Fri, 15 Jan 2021 01:20:23 +0800 Subject: [PATCH] PT-Gen change isIdValid to isUrlValid --- nexus/PTGen/PTGen.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nexus/PTGen/PTGen.php b/nexus/PTGen/PTGen.php index 4eb91edd..dc1b399a 100644 --- a/nexus/PTGen/PTGen.php +++ b/nexus/PTGen/PTGen.php @@ -100,8 +100,8 @@ class PTGen throw new PTGenException("not support site: $site, only support: " . implode(", ", array_keys(self::$validSites))); } $siteInfo = self::$validSites[$site]; - $isIdValid = preg_match($siteInfo['url_pattern'], $url, $matches); - if (!$isIdValid) { + $isUrlValid = preg_match($siteInfo['url_pattern'], $url, $matches); + if (!$isUrlValid) { throw new PTGenException("invalid url: $url"); } return sprintf('%s/?site=%s&sid=%s', trim($this->apiPoint, '/'), $site , $matches[1]);