mirror of
https://github.com/getgrav/grav.git
synced 2026-05-06 12:06:40 +02:00
Selfupgrade CLI: Fixed broken selfupgrade assets reference (fixes #2681)
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
* Fixed fatal error if there are numeric folders in `Flex Pages`
|
||||
* Fixed error on missing `Flex` templates in if `Flex Objects` plugin isn't installed
|
||||
* Grav 1.7: Fixed PHP 7.1 compatibility issues
|
||||
* Selfupgrade CLI: Fixed broken selfupgrade assets reference [#2681](https://github.com/getgrav/grav/issues/2681)
|
||||
|
||||
# v1.7.0-beta.10
|
||||
## 10/03/2019
|
||||
|
||||
@@ -135,7 +135,8 @@ class Response
|
||||
if (!$settings['verify_peer']) {
|
||||
$overrides = array_replace_recursive([], $overrides, [
|
||||
'curl' => [
|
||||
CURLOPT_SSL_VERIFYPEER => $settings['verify_peer']
|
||||
CURLOPT_SSL_VERIFYPEER => $settings['verify_peer'],
|
||||
CURLOPT_SSL_VERIFYHOST => false
|
||||
],
|
||||
'fopen' => [
|
||||
'ssl' => [
|
||||
|
||||
@@ -185,17 +185,17 @@ class SelfupgradeCommand extends ConsoleCommand
|
||||
{
|
||||
$tmp_dir = Grav::instance()['locator']->findResource('tmp://', true, true);
|
||||
$this->tmp = $tmp_dir . '/Grav-' . uniqid('', false);
|
||||
$output = Response::get($package->download, [], [$this, 'progress']);
|
||||
$output = Response::get($package['download'], [], [$this, 'progress']);
|
||||
|
||||
Folder::create($this->tmp);
|
||||
|
||||
$this->output->write("\x0D");
|
||||
$this->output->write(" |- Downloading upgrade [{$this->formatBytes($package->size)}]... 100%");
|
||||
$this->output->write(" |- Downloading upgrade [{$this->formatBytes($package['size'])}]... 100%");
|
||||
$this->output->writeln('');
|
||||
|
||||
file_put_contents($this->tmp . DS . $package->name, $output);
|
||||
file_put_contents($this->tmp . DS . $package['name'], $output);
|
||||
|
||||
return $this->tmp . DS . $package->name;
|
||||
return $this->tmp . DS . $package['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user