From cfaf0c6197bdb90225d1d2f42196ca21cdfe34f2 Mon Sep 17 00:00:00 2001 From: Alan Date: Thu, 15 Feb 2024 11:13:34 +0800 Subject: [PATCH] extra numberic checks as we are using 100% --- Images.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Images.php b/Images.php index 62d760c6..bcedb003 100644 --- a/Images.php +++ b/Images.php @@ -505,15 +505,15 @@ class Pman_Core_Images extends Pman } $w = is_string($dom) ? false : $dom->getAttribute('width'); - $h = is_string($dom) ? false : $dom->getAttribute('width'); + $h = is_string($dom) ? false : $dom->getAttribute('height'); - if (!is_string($dom) && (!empty($w) || !empty($h)) ) + if (!is_string($dom) && (!empty($w) || !empty($h) ) && is_numeric($w) && is_numeric($h)) { // no support for %... $thumbsize = - (empty($w) ? '0' : $w * 1) . + (empty($w) ? '0' : intval($w) * 1) . 'x' . - (empty($h) ? '0' : $h * 1); + (empty($h) ? '0' : intval($h) * 1); $provider = '/Images/Thumb'; } -- 2.39.2