Skip to content

Commit 2003652

Browse files
committed
Fix bug #66660: use str_efree instead of efree to handle interned empty strings correctly
1 parent 7fd9898 commit 2003652

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

NEWS

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ PHP NEWS
88
to complete the set; now possible thanks to bug #66015 being fixed. (Bob)
99
. Fixed bug #66568 (Update reflection information for unserialize() function).
1010
(Ferenc)
11+
. Fixed bug #66660 (Composer.phar install/update fails). (Ferenc)
1112

1213
- mysqlnd:
1314
. Added a new fetching mode to mysqlnd. (Andrey)

Zend/tests/bug66660.phpt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--TEST--
2+
Bug #66660 (Composer.phar install/update fails)
3+
--STDIN--
4+
<?php __CLASS__ ?>
5+
--FILE--
6+
<?php
7+
file_put_contents(__DIR__."/bug66660.tmp.php", "<?php __CLASS__ ?>");
8+
echo php_strip_whitespace(__DIR__."/bug66660.tmp.php");
9+
?>
10+
--CLEAN--
11+
<?php unlink(__DIR__."/bug66660.tmp.php"); ?>
12+
--EXPECT--
13+
<?php __CLASS__ ?>

Zend/zend_highlight.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ ZEND_API void zend_strip(TSRMLS_D)
211211
break;
212212

213213
default:
214-
efree(token.value.str.val);
214+
STR_FREE(token.value.str.val);
215215
break;
216216
}
217217
}

0 commit comments

Comments
 (0)