#38560 [Asn->Opn]: imagejpeg doesn't output image when '' provided as filename
| From: | pajoye@php.net | Date: | Wed, 23 Aug 2006 10:06:01 +0000 |
| Subject: | #38560 [Asn->Opn]: imagejpeg doesn't output image when '' provided as filename | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969373812@lists.php.net to get a copy of this message | ||
ID: 38560
Updated by: pajoye@php.net
Reported By: doques at gmail dot com
-Status: Assigned
+Status: Open
-Bug Type: GD related
+Bug Type: Documentation problem
PHP Version: ?
Assigned To: pajoye
New Comment:
An empty string is an invalid path. If you want to output the image
directly and still change the default compression mode (3rd argument),
pass NULL:
imagejpeg($im, NULL, 60);
It could be added in the image* doc, but it is the way it works for any
other php function with many optional arguments back to doc problem.
Previous Comments:
------------------------------------------------------------------------
[2006-08-23 09:55:54] tony2001@php.net
Which version are YOU using?
------------------------------------------------------------------------
[2006-08-23 09:52:18] doques at gmail dot com
this is a doc problem. It must state that some versions of PHP (e.g.
prior to 4.3.9 or else) has a bug that doesn't allow to enter empty
string.
------------------------------------------------------------------------
[2006-08-23 09:38:31] derick@php.net
Not a doc problem, so changing category to "GD related".
------------------------------------------------------------------------
[2006-08-23 09:38:26] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Can't reproduce it.
------------------------------------------------------------------------
[2006-08-23 08:52:07] doques at gmail dot com
Description:
------------
imagejpeg doesn't output image when '' provided as filename. PHP
warning is printed instead:
* warning: imagejpeg(): Invalid filename '' in
/var/www/html/htdocs/image.inc on line 310.
Documentation states that empty string can be provided and image will
be outputed to standart buffer.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38560&edit=1