- Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE
on error. (Pierre)
- Fixed bug #36152 (problems with curl+ssl and pgsql+ssl in same PHP). (Mike)
+- Fixed bug #36148 (unpack("H*hex", $data) is adding an extra character to the
+ end of the string). (Ilia)
- Fixed bug #36134 (DirectoryIterator constructor failed to detect empty
directory names). (Ilia)
- Fixed bug #36113 (Reading records of unsupported type causes segfault).
--- /dev/null
+--TEST--
+Bug #36148 (unpack("H*hex", $data) is adding an extra character to the end of the string)
+--FILE--
+<?php
+$values = array("a", "aa", "aaa", "aaaa");
+foreach ($values as $value) {
+ $a = pack("H*", $value);
+ $b = unpack("H*", $a);
+ echo $value.": ";
+ var_dump($b);
+}
+?>
+--EXPECT--
+a: array(1) {
+ [1]=>
+ string(2) "a0"
+}
+aa: array(1) {
+ [1]=>
+ string(2) "aa"
+}
+aaa: array(1) {
+ [1]=>
+ string(4) "aaa0"
+}
+aaaa: array(1) {
+ [1]=>
+ string(4) "aaaa"
+}