dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2b55c2
)
Prevent division-by-zero-errors. BUG#1007562
author
Jens Frank
<jeluf@users.mediawiki.org>
Wed, 11 Aug 2004 22:24:06 +0000
(22:24 +0000)
committer
Jens Frank
<jeluf@users.mediawiki.org>
Wed, 11 Aug 2004 22:24:06 +0000
(22:24 +0000)
includes/Skin.php
patch
|
blob
|
history
diff --git
a/includes/Skin.php
b/includes/Skin.php
index
12aec53
..
712fa9e
100644
(file)
--- a/
includes/Skin.php
+++ b/
includes/Skin.php
@@
-1891,13
+1891,20
@@
class Skin {
$alt = preg_replace( '/<[^>]*>/', '', $label);
$alt = htmlspecialchars( $alt );
+ $width = $height = 0;
if ( $img->exists() )
{
$width = $img->getWidth();
$height = $img->getHeight();
- } else {
+ }
+ if ( 0 == $width || 0 == $height )
+ {
$width = $height = 200;
}
+ if ( $boxwidth == 0 )
+ {
+ $boxwidth = 200;
+ }
if ( $framed )
{
// Use image dimensions, don't scale