try fix: can not update in php8
parent
273f41d90b
commit
2850db0699
|
@ -317,8 +317,8 @@ function OnekeyUpate($auth = 'qkqpttgf', $project = 'OneManager-php', $branch =
|
||||||
$githubfile = file_get_contents($url);
|
$githubfile = file_get_contents($url);
|
||||||
if (!$githubfile) return 0;
|
if (!$githubfile) return 0;
|
||||||
file_put_contents($tarfile, $githubfile);
|
file_put_contents($tarfile, $githubfile);
|
||||||
if (splitfirst(PHP_VERSION, '.')[0] == '7') {
|
if (splitfirst(PHP_VERSION, '.')[0] > '5') {
|
||||||
$phar = new PharData($tarfile); // need php7
|
$phar = new PharData($tarfile); // need php5.3, 7, 8
|
||||||
$phar->extractTo($projectPath, null, true);//路径 要解压的文件 是否覆盖
|
$phar->extractTo($projectPath, null, true);//路径 要解压的文件 是否覆盖
|
||||||
} else {
|
} else {
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
Loading…
Reference in New Issue