ID: 38794 Updated by: [EMAIL PROTECTED] Reported By: bytewise at gmx dot net -Status: Open +Status: Assigned Bug Type: Documentation problem PHP Version: Irrelevant -Assigned To: +Assigned To: pajoye
Previous Comments: ------------------------------------------------------------------------ [2006-09-12 16:09:42] bytewise at gmx dot net 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38794&edit=1