001-mb.phpt 677 B

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