1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 22:11:12 +02:00
Files
archived-php-src/ext/gd/tests/bug73157.phpt
Christoph M. Becker c240978067 Fix #73157: imagegd2() ignores 3rd param if 4 are given
We must initialize `q` for *more* than three parameters, too.
2016-09-23 23:42:34 +02:00

23 lines
457 B
PHP

--TEST--
Bug #73157 (imagegd2() ignores 3rd param if 4 are given)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
$im = imagecreate(8, 8);
imagecolorallocate($im, 0, 0, 0);
ob_start();
imagegd2($im, null, 256, IMG_GD2_RAW);
$buffer = ob_get_clean();
$header = unpack('@10/nchunk_size', $buffer);
printf("chunk size: %d\n", $header['chunk_size']);
?>
===DONE===
--EXPECT--
chunk size: 256
===DONE===