php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36464 imagepng empty second param shows error
Submitted: 2006-02-20 16:27 UTC Modified: 2006-02-21 10:36 UTC
From: mdhp at gmx dot de Assigned:
Status: Not a bug Package: GD related
PHP Version: 5.1.2 OS: debian 3.1
Private report: No CVE-ID: None
 [2006-02-20 16:27 UTC] mdhp at gmx dot de
Description:
------------
Empty second param for imagepng shows trashcode but not the png.

Not a real bug, but Versions before 5.1.2 are ok.
Function imagegif with second empty param works.

Reproduce code:
---------------
// ... snip ... imagecreate code from png file...
// At version < 5.1.2 png will shown on browser

$output_filename = '';
imagepng($src, $output_filename);

// on 5.1.2 you have to check if output_filename empty
// imagegif works fine with two params



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-20 17:16 UTC] bjori@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

You'll need to send correct header
 [2006-02-21 10:36 UTC] mdhp at gmx dot de
Yes thats right, so i wrote "... snip..." code for sending header is done and works fine for gifs and jpgs.

But the second parameter for imagepng must set in 5.1.2.
In old versions an empty parameter could be transmitted.

Normaly you can put an empty parameter or no parameter, the result is the same, but not in 5.1.2.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 14 01:01:32 2024 UTC