Fix #1179 issue when we have a meta file without corresponding media

Also update changelog entries
This commit is contained in:
Flavio Copes
2016-11-22 17:22:27 +01:00
parent 5105be338a
commit 55bb4cf2fa
2 changed files with 12 additions and 0 deletions

View File

@@ -1,3 +1,12 @@
# v1.1.x
## 11/xx/2016
1. [](#improved)
* Multisite: Create image cache folder if it doesn't exist
* Add 2 new language values for French [#1174](https://github.com/getgrav/grav/issues/1174)
1. [](#bugfix)
* Fixed issue when we have a meta file without corresponding media [#1179](https://github.com/getgrav/grav/issues/1179)
# v1.1.9-rc.1
## 11/09/2016

View File

@@ -75,6 +75,9 @@ class Media extends Getters
// Create the base medium
if (empty($types['base'])) {
if (!isset($types['alternative'])) {
continue;
}
$max = max(array_keys($types['alternative']));
$medium = $types['alternative'][$max]['file'];
$medium = MediumFactory::scaledFromMedium($medium, $max, 1)['file'];