Merge branches '1.7' and 'develop' of github.com:getgrav/grav into 1.7

# Conflicts:
#	CHANGELOG.md
This commit is contained in:
Matias Griese
2019-06-19 21:52:28 +03:00
3 changed files with 17 additions and 5 deletions

View File

@@ -1,3 +1,8 @@
# v1.7.0-beta.2
## mm/dd/2019
1. [](#new)
# v1.7.0-beta.1
## 06/14/2019
@@ -8,6 +13,15 @@
* Updated Symfony Components to 4.3
* Added support for Twig 2.11 (compatible with Twig 1.40+)
* Added `$grav->exit()` method to properly terminate the request with a response
* Optimization: Initialize debugbar only after the configuration has been loaded
* Optimization: Combine some early Grav processors into a single one
# v1.6.11
## mm/dd/2019
1. [](#bugfix)
* Fixed error in `ImageMedium::url()` if the image cache folder does not exist
* Fixed empty form flash name after update
# v1.6.10
## 06/14/2019
@@ -17,8 +31,6 @@
* Removed `Gitter` and `Slack` [#2502](https://github.com/getgrav/grav/issues/2502)
* Optimizations for Plugin/Theme loading
* Generalized markdown classes so they can be used outside of `Page` scope with a custom `Excerpts` class instance
* Optimization: Initialize debugbar only after the configuration has been loaded
* Optimization: Combine some early Grav processors into a single one
* Change minimal port number to 0 (unix socket) [#2452](https://github.com/getgrav/grav/issues/2452)
1. [](#bugfix)
* Force question to install demo content in theme update [#2493](https://github.com/getgrav/grav/issues/2493)

View File

@@ -170,8 +170,7 @@ class ImageMedium extends Medium
{
/** @var UniformResourceLocator $locator */
$locator = Grav::instance()['locator'];
$image_path = $locator->findResource('cache://images', true);
$image_dir = $locator->findResource('cache://images', false);
$image_path = $locator->findResource('cache://images', true) ?: $locator->findResource('cache://images', true, true);
$saved_image_path = $this->saveImage();
$output = preg_replace('|^' . preg_quote(GRAV_ROOT, '|') . '|', '', $saved_image_path);
@@ -181,6 +180,7 @@ class ImageMedium extends Medium
}
if (Utils::startsWith($output, $image_path)) {
$image_dir = $locator->findResource('cache://images', false);
$output = '/' . $image_dir . preg_replace('|^' . preg_quote($image_path, '|') . '|', '', $output);
}

View File

@@ -66,7 +66,7 @@ class FormFlash implements \JsonSerializable
} catch (\Exception $e) {
$data = [];
}
$this->formName = null !== $formName ? $content['form'] ?? '' : '';
$this->formName = $content['form'] ?? $formName;
$this->url = $data['url'] ?? '';
$this->user = $data['user'] ?? null;
$this->data = $data['data'] ?? null;