mirror of
https://github.com/getgrav/grav.git
synced 2026-09-02 05:16:13 +02:00
Fixed wrong construct order in ImageMedium
This commit is contained in:
@@ -44,8 +44,6 @@ class ImageMedium extends Medium implements ImageMediaInterface, ImageManipulate
|
||||
*/
|
||||
public function __construct($items = [], Blueprint $blueprint = null)
|
||||
{
|
||||
parent::__construct($items, $blueprint);
|
||||
|
||||
/** @var Config $config */
|
||||
$config = $this->getGrav()['config'];
|
||||
|
||||
@@ -59,6 +57,8 @@ class ImageMedium extends Medium implements ImageMediaInterface, ImageManipulate
|
||||
|
||||
];
|
||||
|
||||
parent::__construct($items, $blueprint);
|
||||
|
||||
$this->def('debug', $config->get('system.images.debug'));
|
||||
|
||||
$path = $this->get('filepath');
|
||||
@@ -75,8 +75,6 @@ class ImageMedium extends Medium implements ImageMediaInterface, ImageManipulate
|
||||
}
|
||||
}
|
||||
|
||||
$this->reset();
|
||||
|
||||
if ($config->get('system.images.cache_all', false)) {
|
||||
$this->cache();
|
||||
}
|
||||
@@ -104,7 +102,7 @@ class ImageMedium extends Medium implements ImageMediaInterface, ImageManipulate
|
||||
|
||||
$this->format = 'guess';
|
||||
$this->options = $this->defaults;
|
||||
$this->quality = $this->options['quality'];
|
||||
$this->quality = $this->defaults['quality'];
|
||||
$this->debug_watermarked = false;
|
||||
|
||||
$this->resetImage();
|
||||
|
||||
Reference in New Issue
Block a user