mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
a375d54785
Cf. PR #6787. Closes GH-6994.
28 lines
569 B
PHP
28 lines
569 B
PHP
--TEST--
|
|
imagecreatefrompng() and empty/missing file
|
|
--EXTENSIONS--
|
|
gd
|
|
--SKIPIF--
|
|
<?php if (!function_exists("imagecreatefrompng")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$file = __DIR__."/001.test";
|
|
@unlink($file);
|
|
|
|
var_dump(imagecreatefrompng($file));
|
|
touch($file);
|
|
var_dump(imagecreatefrompng($file));
|
|
|
|
@unlink($file);
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
Warning: imagecreatefrompng(%s001.test): Failed to open stream: No such file or directory in %s on line %d
|
|
bool(false)
|
|
|
|
Warning: imagecreatefrompng(): "%s001.test" is not a valid PNG file in %s on line %d
|
|
bool(false)
|
|
Done
|