note 108032 added to function.imagepng
| From: | geompse at gmail dot com | Date: | Fri, 23 Mar 2012 11:41:44 +0000 |
| Subject: | note 108032 added to function.imagepng | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-186789@lists.php.net to get a copy of this message | ||
Be careful when using a variable for the file name.
PHP behavior with $filename differs when switching to PHP5.4 : PHP5.3 will use
$filename='' the same way as $filename=NULL (e.g. no warning)
<?php
$im = imagecreatetruecolor(10,10);
imagepng($im,'',9); # Warning: imagepng(): Filename cannot be empty
imagepng($im,NULL,9); # works as expected
imagedestroy($im);
?>
----
Server IP: 89.31.146.176
Probable Submitter: 82.227.124.74
----
Manual Page -- http://www.php.net/manual/en/function.imagepng.php
Edit -- https://master.php.net/note/edit/108032
Del: integrated -- https://master.php.net/note/delete/108032/integrated
Del: useless -- https://master.php.net/note/delete/108032/useless
Del: bad code -- https://master.php.net/note/delete/108032/bad+code
Del: spam -- https://master.php.net/note/delete/108032/spam
Del: non-english -- https://master.php.net/note/delete/108032/non-english
Del: in docs -- https://master.php.net/note/delete/108032/in+docs
Del: other reasons-- https://master.php.net/note/delete/108032
Reject -- https://master.php.net/note/reject/108032
Search -- https://master.php.net/manage/user-notes.php