1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/gd/tests/gh19955.phpt
David Carlier 3c063abba1 ext/gd: Fix GH-19955 unit test.
Adding guard for imagefttext() availability.

close GH-20309
2025-10-27 17:45:17 +00:00

20 lines
383 B
PHP

--TEST--
GH-19955: (imagefttext() memory leak)
--EXTENSIONS--
gd
--CREDITS--
YuanchengJiang
--SKIPIF--
<?php
if(!function_exists('imagefttext')) die('skip imagefttext() not available');
?>
--FILE--
<?php
ini_set('error_reporting', E_ALL&~E_WARNING);
$im = imagecreate(64, 32);
imagefttext(imagecreate(8, 8), 0, 0, 0, 0, 255, __DIR__ . "/Tuffy.ttf", 'Ж');
echo "OK"
?>
--EXPECT--
OK