From 2850db0699420dad411f5daa4807b0b5f1994cd3 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sun, 14 Mar 2021 16:42:31 +0800 Subject: [PATCH] try fix: can not update in php8 --- platform/Normal.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/Normal.php b/platform/Normal.php index 95aa364..db41046 100644 --- a/platform/Normal.php +++ b/platform/Normal.php @@ -317,8 +317,8 @@ function OnekeyUpate($auth = 'qkqpttgf', $project = 'OneManager-php', $branch = $githubfile = file_get_contents($url); if (!$githubfile) return 0; file_put_contents($tarfile, $githubfile); - if (splitfirst(PHP_VERSION, '.')[0] == '7') { - $phar = new PharData($tarfile); // need php7 + if (splitfirst(PHP_VERSION, '.')[0] > '5') { + $phar = new PharData($tarfile); // need php5.3, 7, 8 $phar->extractTo($projectPath, null, true);//路径 要解压的文件 是否覆盖 } else { ob_start();