From 05731b10697df5f12d07c8c8edd19792698119b7 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Tue, 18 Aug 2020 13:41:53 -0600 Subject: [PATCH] Fix bug --- modules/system/classes/ImageResizer.php | 6 +++--- modules/system/twig/Extension.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/system/classes/ImageResizer.php b/modules/system/classes/ImageResizer.php index 426cceb9a..ae7dde785 100644 --- a/modules/system/classes/ImageResizer.php +++ b/modules/system/classes/ImageResizer.php @@ -155,8 +155,8 @@ class ImageResizer public function __construct($image, $width = 0, $height = 0, $options = []) { $this->image = static::normalizeImage($image); - $this->width = (int) ($width === 'auto') ? 0 : $width; - $this->height = (int) ($height === 'auto') ? 0 : $height; + $this->width = (int) (($width === 'auto') ? 0 : $width); + $this->height = (int) (($height === 'auto') ? 0 : $height); $this->options = array_merge($this->getDefaultOptions(), $options); } @@ -761,7 +761,7 @@ class ImageResizer * @throws SystemException If the provided input was unable to be processed * @return string */ - public static function getFilterUrl($image, $width = null, $height = null, $options = []) + public static function filterGetUrl($image, $width = null, $height = null, $options = []) { // Attempt to process the provided image try { diff --git a/modules/system/twig/Extension.php b/modules/system/twig/Extension.php index aa5839646..70dcad8dd 100644 --- a/modules/system/twig/Extension.php +++ b/modules/system/twig/Extension.php @@ -118,6 +118,6 @@ class Extension extends TwigExtension */ public function resizeFilter($image, $width = null, $height = null, $options = []) { - return ImageResizer::getFilterUrl($image, $width, $height, $options); + return ImageResizer::filterGetUrl($image, $width, $height, $options); } }