Skip to content

Commit

Permalink
try fix: can not update in php8
Browse files Browse the repository at this point in the history
  • Loading branch information
qkqpttgf committed Mar 14, 2021
1 parent 273f41d commit 2850db0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions platform/Normal.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 2850db0

Please sign in to comment.