|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-12 18:23 UTC] pajoye@php.net
[2006-09-12 19:14 UTC] bytewise at gmx dot net
[2006-09-17 04:53 UTC] fletch at pobox dot com
[2007-01-23 01:48 UTC] didou@php.net
[2020-02-07 06:10 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 20:00:01 2025 UTC |
Description: ------------ The documentation of imagepng (in English and German) states that the second parameter may be null or the empty string: " bool imagepng ( resource image [, string filename] ) The filename argument is optional, and if left off or filled with a NULL value, the raw image stream will be output directly. " This is not the case, at least in php 5.1.6 this function does not work anymore if given an empty string or null as second parameter. It will merely generate a warning ("Unable to open '' for writing"), and output some trash, not a real png image. This problem is NOT related to sending a bad header. The same code worked fine for me in php 5.0.4; after an upgrade to 5.1.6 it stopped working. I removed the second (null) parameter to imagepng, and it worked again. Only it took a couple of hours to find out :) There at least 2 bug reports that are related to this, both of which have been closed (nothing having been done about them): http://bugs.php.net/35061 http://bugs.php.net/36464