Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/gd/tests/gh13082.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GH-13082 - imagefontwidth/height unexpectedly throwing an exception on a valid G
--EXTENSIONS--
gd
--SKIPIF--
<?php if (getenv('TRAVIS')) die('skip Currently fails on Travis'); ?>
<?php if (pack('i', 0x01020304) !== "\x04\x03\x02\x01") die('skip unsupported platform'); ?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to be clear about "what" the platform does not support.

Suggested change
<?php if (pack('i', 0x01020304) !== "\x04\x03\x02\x01") die('skip unsupported platform'); ?>
<?php if (pack('i', 0x01020304) !== "\x04\x03\x02\x01") die('skip big endian is unsupported'); ?>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, but it's not only about the endianess, but also int must be 32bit. Maybe the latter is pretty much the case everywhere nowadays, but that might change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I overlooked that. It is impossible to explain this in detail in one sentence.

--FILE--
<?php
$font = imageloadfont(__DIR__ . "/gh13082.gdf");
Expand Down