diff --git a/app/data/service/UserTokenService.php b/app/data/service/UserTokenService.php index 180cf096a..1dd52f5f3 100644 --- a/app/data/service/UserTokenService.php +++ b/app/data/service/UserTokenService.php @@ -82,10 +82,10 @@ class UserTokenService extends Service public function token(int $uuid, string $type): array { // 清理无效认证数据 - $map0 = [['token', '<>', 'token']]; - $map1 = [['time', '<', $time = time()]]; - $map2 = [['type', '=', $type], ['uid', '=', $uuid]]; - $this->app->db->name('DataUserToken')->where($map0)->whereOr([$map1, $map2])->delete(); + $time = time(); + $map1 = [['token', '<>', 'token'], ['time', '<', $time]]; + $map2 = [['token', '<>', 'token'], ['type', '=', $type], ['uid', '=', $uuid]]; + $this->app->db->name('DataUserToken')->whereOr([$map1, $map2])->delete(); // 创建新的认证数据 do $map = ['type' => $type, 'token' => md5(uniqid() . rand(100, 999))]; while ($this->app->db->name('DataUserToken')->where($map)->count() > 0); diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php index 2c3bcd1bf..b3a4e1611 100644 --- a/vendor/composer/InstalledVersions.php +++ b/vendor/composer/InstalledVersions.php @@ -249,7 +249,13 @@ class InstalledVersions @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); if (null === self::$installed) { - self::$installed = include __DIR__ . '/installed.php'; + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = include __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } } return self::$installed; @@ -316,7 +322,13 @@ class InstalledVersions } if (null === self::$installed) { - self::$installed = require __DIR__ . '/installed.php'; + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = require __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } } $installed[] = self::$installed; diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index bab61b923..5445832c5 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -5,7 +5,7 @@ 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '612077be96278a23df4f517da2088fc3147574e0', + 'reference' => 'ace10b89177358237d3c4e0e06749cac94208523', 'name' => 'zoujingli/thinkadmin', 'dev' => false, ), @@ -153,7 +153,7 @@ 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '612077be96278a23df4f517da2088fc3147574e0', + 'reference' => 'ace10b89177358237d3c4e0e06749cac94208523', 'dev_requirement' => false, ), 'zoujingli/wechat-developer' => array( diff --git a/vendor/services.php b/vendor/services.php index b9f9be2b3..8b8acab41 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\admin\\Library',