Skip to content

Commit 02a60be

Browse files
committed
Fix skip condition of gh13082.phpt
The test failure is not particularly related to Travis, but rather is caused by the GD font file to only be suitable for platforms where `int` stores 32bit values in little endian byte order. This platform dependence is documented in the source code[1]. Thus we fix the skip condition and skip reason accordingly. An alternative would be to dynamically create the font file just before running the test, but that appears to be overkill. [1] <https://github.com/php/php-src/blob/d59691c02fa77b65855ebbcd5f50aaac034ab75d/ext/gd/gd.c#L545-L556> Closes GH-14922.
1 parent 0ed956d commit 02a60be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/gd/tests/gh13082.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ GH-13082 - imagefontwidth/height unexpectedly throwing an exception on a valid G
33
--EXTENSIONS--
44
gd
55
--SKIPIF--
6-
<?php if (getenv('TRAVIS')) die('skip Currently fails on Travis'); ?>
6+
<?php if (pack('i', 0x01020304) !== "\x04\x03\x02\x01") die('skip unsupported platform'); ?>
77
--FILE--
88
<?php
99
$font = imageloadfont(__DIR__ . "/gh13082.gdf");

0 commit comments

Comments
 (0)