diff --git a/src/SPC/store/source/PhpSource.php b/src/SPC/store/source/PhpSource.php index f23f63ea..ce7483f6 100644 --- a/src/SPC/store/source/PhpSource.php +++ b/src/SPC/store/source/PhpSource.php @@ -35,6 +35,10 @@ class PhpSource extends CustomSourceBase { // 查找最新的小版本号 $info = json_decode(Downloader::curlExec(url: "https://www.php.net/releases/index.php?json&version={$major_version}"), true); + if (!isset($info['version'])) { + throw new DownloaderException("Version {$major_version} not found."); + } + $version = $info['version']; // 从官网直接下载