--TEST-- Testing null byte injection in imagepng --SKIPIF-- --CLEAN-- $tempdir = sprintf("%s/%s", sys_get_temp_dir(), preg_replace("~\.php$~", null, __FILE__)); foreach (glob($tempdir . "/test*") as $file ) { unlink($file); } rmdir($tempdir); --FILE-- --EXPECTF-- Warning: imagepng(): Invalid 2nd parameter, filename must not contain null bytes in %s on line %d bool(false)