Skip to content

Commit 77ddfb5

Browse files
committed
Merge remote-tracking branch 'TimWolla/uriparser-update' into verify_bundled_boost_context
2 parents 57d46d5 + 1c23eb4 commit 77ddfb5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+9360
-9903
lines changed

NEWS

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ PHP NEWS
88
. It is now possible to use reference assign on WeakMap without the key
99
needing to be present beforehand. (nielsdos)
1010

11-
- Hash:
12-
. Upgrade xxHash to 0.8.2. (timwolla)
11+
- Standard:
12+
. Fix memory leak in array_diff() with custom type checks. (ndossche)
13+
14+
- Opcache:
15+
. Fixed bug GH-20329 (opcache.file_cache broken with full interned string
16+
buffer). (Arnaud)
1317

1418
- Intl:
1519
. Added IntlNumberRangeFormatter class to format an interval of two numbers

ext/standard/array.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5909,6 +5909,7 @@ PHP_FUNCTION(array_diff)
59095909

59105910
for (i = 1; i < argc; i++) {
59115911
if (Z_TYPE(args[i]) != IS_ARRAY) {
5912+
zend_tmp_string_release(tmp_search_str);
59125913
zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i]));
59135914
RETURN_THROWS();
59145915
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--TEST--
2+
array_diff() memory leak with custom type checks
3+
--FILE--
4+
<?php
5+
6+
try {
7+
array_diff([123], 'x');
8+
} catch (TypeError $e) {
9+
echo $e->getMessage(), "\n";
10+
}
11+
12+
?>
13+
--EXPECT--
14+
array_diff(): Argument #2 must be of type array, string given

ext/uri/tests/rfc3986/modification/host_success_unset_existing.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ var_dump($uri2->toString());
1818
--EXPECT--
1919
string(11) "example.com"
2020
NULL
21-
string(7) "https:/"
21+
string(6) "https:"
2222
NULL
23-
string(7) "https:/"
23+
string(6) "https:"

0 commit comments

Comments
 (0)