1--TEST--
2imagecreatefrompng() and empty/missing file
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php if (!function_exists("imagecreatefrompng")) print "skip"; ?>
7--FILE--
8<?php
9
10$file = __DIR__."/001.test";
11@unlink($file);
12
13var_dump(imagecreatefrompng($file));
14touch($file);
15var_dump(imagecreatefrompng($file));
16
17@unlink($file);
18
19echo "Done\n";
20?>
21--EXPECTF--
22Warning: imagecreatefrompng(%s001.test): Failed to open stream: No such file or directory in %s on line %d
23bool(false)
24
25Warning: imagecreatefrompng(): "%s001.test" is not a valid PNG file in %s on line %d
26bool(false)
27Done
28