php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #38560 imagejpeg doesn't output image when '' provided as filename
Submitted: 2006-08-23 08:52 UTC Modified: 2006-08-23 10:49 UTC
From: doques at gmail dot com Assigned: colder (profile)
Status: Closed Package: Documentation problem
PHP Version: ? OS:
Private report: No CVE-ID: None
 [2006-08-23 08:52 UTC] 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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-23 09:38 UTC] 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 09:38 UTC] derick@php.net
Not a doc problem, so changing category to "GD related".
 [2006-08-23 09:52 UTC] 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:55 UTC] tony2001@php.net
Which version are YOU using?
 [2006-08-23 10:06 UTC] pajoye@php.net
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.
 [2006-08-23 10:49 UTC] colder@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:11 UTC] phpdocbot@php.net
Automatic comment on behalf of colder
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=c364439994b3868236486bf7ca37c1e35a799cf2
Log: Fix #38560 (How to skip filename argument)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC