cvs: pear /Image_Transform/Driver GD.php
| From: | Philippe Jausions | Date: | Wed, 01 Mar 2006 17:29:20 +0000 |
| Subject: | cvs: pear /Image_Transform/Driver GD.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-38801@lists.php.net to get a copy of this message | ||
jausions Wed Mar 1 17:29:20 2006 UTC
Modified files:
/pear/Image_Transform/Driver GD.php
Log:
Fix for bug # 6770 on empty file names and none-JPEG format output.
http://cvs.php.net/viewcvs.cgi/pear/Image_Transform/Driver/GD.php?r1=1.30&r2=1.31&diff_format=u
Index: pear/Image_Transform/Driver/GD.php
diff -u pear/Image_Transform/Driver/GD.php:1.30 pear/Image_Transform/Driver/GD.php:1.31
--- pear/Image_Transform/Driver/GD.php:1.30 Wed Aug 10 19:26:06 2005
+++ pear/Image_Transform/Driver/GD.php Wed Mar 1 17:29:20 2006
@@ -21,7 +21,7 @@
* @author Philippe Jausions <Philippe.Jausions@11abacus.com>
* @copyright 2002-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: GD.php,v 1.30 2005/08/10 19:26:06 jausions Exp $
+ * @version CVS: $Id: GD.php,v 1.31 2006/03/01 17:29:20 jausions Exp $
* @link http://pear.php.net/package/Image_Transform
*/
@@ -455,9 +455,9 @@
if ($filename == '') {
header('Content-type: ' . $this->getMimeType($type));
- $action = 'save image to file';
- } else {
$action = 'output image';
+ } else {
+ $action = 'save image to file';
}
$functionName = 'image' . $type;
@@ -466,7 +466,11 @@
$result = $functionName($this->imageHandle, $filename, $quality);
break;
default:
- $result = $functionName($this->imageHandle, $filename);
+ if ($filename == '') {
+ $result = $functionName($this->imageHandle);
+ } else {
+ $result = $functionName($this->imageHandle, $filename);
+ }
}
if (!$result) {
return PEAR::raiseError('Couldn\'t ' . $action,