We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2eb68a commit fee9f3aCopy full SHA for fee9f3a
ext/gd/tests/imageloadfont_end_of_file_while_reading_header.phpt
@@ -0,0 +1,25 @@
1
+--TEST--
2
+imageloadfont() "End of file while reading header"
3
+--CREDITS--
4
+Ike Devolder <ike.devolder@gmail.com>
5
+User Group: PHP-WVL & PHPGent #PHPTestFest
6
+--SKIPIF--
7
+<?php
8
+if (!extension_loaded('gd')) die("skip gd extension not available\n");
9
+?>
10
+--FILE--
11
12
+$filename = dirname(__FILE__) . '/font.gdf';
13
+$bin = "\x41\x41\x41\x41\x00\x00\x00\x00\x00\x00";
14
+$fp = fopen($filename, 'wb');
15
+fwrite($fp, $bin);
16
+fclose($fp);
17
+
18
+$font = imageloadfont($filename);
19
20
+--CLEAN--
21
22
+unlink(__DIR__.'/font.gdf');
23
24
+--EXPECTF--
25
+Warning: imageloadfont(): End of file while reading header in %s on line %d
0 commit comments