Skip to content

Commit ec44759

Browse files
author
stunami
committed
Fixing bug when using an image as a background using GD
git-svn-id: http://svn.symfony-project.com/plugins/sfImageTransformPlugin/trunk@32150 ee427ae8-e902-0410-961c-c3ed070cd9f9
1 parent cb715ad commit ec44759

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/transforms/GD/sfImageFillGD.class.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* Fills the set area with a color or tile image.
1515
*
16-
* @package sfImageTransform
16+
* @package sfImageTransform
1717
* @subpackage transforms
1818
* @author Stuart Lowes <[email protected]>
1919
* @version SVN: $Id$
@@ -115,7 +115,7 @@ public function getY()
115115
*/
116116
public function setFill($fill)
117117
{
118-
if (preg_match('/#[\d\w]{6}/',$fill) || (is_object($fill) && class_name($fill) === 'sfImage'))
118+
if ((is_object($fill) && class_name($fill) === 'sfImage') || preg_match('/#[\d\w]{6}/',$fill))
119119
{
120120
$this->fill = $fill;
121121

@@ -149,12 +149,12 @@ protected function transform(sfImage $image)
149149
{
150150
imagesettile($resource, $this->fill->getAdapter()->getHolder());
151151
imagefill($resource, $this->x, $this->y, IMG_COLOR_TILED);
152-
}
153-
154-
else
152+
}
153+
154+
else
155155
{
156156
imagefill($resource, $this->x, $this->y, $image->getAdapter()->getColorByHex($resource, $this->fill));
157-
}
157+
}
158158

159159
return $image;
160160
}

0 commit comments

Comments
 (0)