From 112edf7ef89b4bd95b7b929b33f5559b5865952e Mon Sep 17 00:00:00 2001 From: zhushaolong <15210900722@163.com> Date: Mon, 4 Mar 2024 00:21:05 +0800 Subject: [PATCH] Update VersionManager.php Solve the problem of unable to install extensions --- src/Extend/VersionManager.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Extend/VersionManager.php b/src/Extend/VersionManager.php index ec4f21b3f..bcaa56628 100644 --- a/src/Extend/VersionManager.php +++ b/src/Extend/VersionManager.php @@ -204,7 +204,11 @@ public function getNewFileVersions($name, $version = null) $position = array_search($version, array_keys($versions)); - return array_slice($versions, ++$position); + if ($position === false) { + return $versions; + } + + return array_slice($versions, $position++); } public function getFileVersions($name)