1--TEST--
2Testing null byte injection in imagegd2
3--SKIPIF--
4<?php
5        if(!extension_loaded('gd')){ die('skip gd extension not available'); }
6?>
7--FILE--
8<?php
9$image = imagecreate(1,1);// 1px image
10var_dump(imagegd2($image, "./foo\0bar"));
11?>
12--EXPECTF--
13Warning: imagegd2() expects parameter 2 to be a valid path, string given in %s on line %d
14NULL
15