projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1ec672d
)
extra numberic checks as we are using 100%
author
Alan
<alan@roojs.com>
Thu, 15 Feb 2024 03:13:34 +0000
(11:13 +0800)
committer
Alan
<alan@roojs.com>
Thu, 15 Feb 2024 03:13:34 +0000
(11:13 +0800)
Images.php
patch
|
blob
|
history
diff --git
a/Images.php
b/Images.php
index
62d760c
..
bcedb00
100644
(file)
--- a/
Images.php
+++ b/
Images.php
@@
-505,15
+505,15
@@
class Pman_Core_Images extends Pman
}
$w = is_string($dom) ? false : $dom->getAttribute('width');
}
$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 =
{
// no support for %...
$thumbsize =
- (empty($w) ? '0' :
$w
* 1) .
+ (empty($w) ? '0' :
intval($w)
* 1) .
'x' .
'x' .
- (empty($h) ? '0' :
$h
* 1);
+ (empty($h) ? '0' :
intval($h)
* 1);
$provider = '/Images/Thumb';
}
$provider = '/Images/Thumb';
}