Skip to content

Commit 09957ab

Browse files
orlitzkynielsdos
authored andcommitted
ext/gd/tests/gh10614.phpt: skip if no PNG support
This test uses imagecreatefrompng(), which won't be there if libgd was built without PNG support. Closes phpGH-14905.
1 parent eb8c3cb commit 09957ab

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ PHP NEWS
1414
- Dom:
1515
. Fixed bug GH-14702 (DOMDocument::xinclude() crash). (nielsdos)
1616

17+
- Gd:
18+
. ext/gd/tests/gh10614.phpt: skip if no PNG support. (orlitzky)
19+
1720
- LibXML:
1821
. Fixed bug GH-14563 (Build failure with libxml2 v2.13.0). (nielsdos)
1922

ext/gd/tests/gh10614.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ gd
55
--SKIPIF--
66
<?php
77
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.3.4', '>=')) die("skip test requires GD 2.3.4 or older");
8+
if (!(imagetypes() & IMG_PNG)) {
9+
die("skip No PNG support");
10+
}
811
?>
912
--FILE--
1013
<?php

0 commit comments

Comments
 (0)