Skip to content

Commit 1ad4a92

Browse files
committed
Merge tag 'php-8.2.20' into was-8.2.x
Tag for php-8.2.20
2 parents e1a8cbb + 40298a9 commit 1ad4a92

File tree

86 files changed

+1865
-275
lines changed

Some content is hidden

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

86 files changed

+1865
-275
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
resource_class: arm.medium
66
docker:
77
- image: cimg/base:current-22.04
8-
- image: mysql:8
8+
- image: mysql:8.3
99
environment:
1010
MYSQL_ALLOW_EMPTY_PASSWORD: true
1111
MYSQL_ROOT_PASSWORD: ''

.github/actions/setup-oracle/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ runs:
1313
-d gvenzl/oracle-xe:slim
1414
1515
mkdir /opt/oracle
16-
wget -nv https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip
17-
unzip instantclient-basiclite-linuxx64.zip && rm instantclient-basiclite-linuxx64.zip
18-
wget -nv https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip
19-
unzip instantclient-sdk-linuxx64.zip && rm instantclient-sdk-linuxx64.zip
16+
wget -nv https://download.oracle.com/otn_software/linux/instantclient/2114000/instantclient-basiclite-linux.x64-21.14.0.0.0dbru.zip
17+
unzip instantclient-basiclite-linux.x64-21.14.0.0.0dbru.zip && rm instantclient-basiclite-linux.x64-21.14.0.0.0dbru.zip
18+
wget -nv https://download.oracle.com/otn_software/linux/instantclient/2114000/instantclient-sdk-linux.x64-21.14.0.0.0dbru.zip
19+
unzip instantclient-sdk-linux.x64-21.14.0.0.0dbru.zip && rm instantclient-sdk-linux.x64-21.14.0.0.0dbru.zip
2020
mv instantclient_*_* /opt/oracle/instantclient
2121
# interferes with libldap2 headers
2222
rm /opt/oracle/instantclient/sdk/include/ldap.h

.github/workflows/push.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ jobs:
7272
# job id, not the job name)
7373
key: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}-${{hashFiles('main/php_version.h')}}"
7474
append-timestamp: false
75+
save: ${{ github.event_name != 'pull_request' }}
7576
- name: ./configure
7677
uses: ./.github/actions/configure-x64
7778
with:
@@ -111,6 +112,7 @@ jobs:
111112
with:
112113
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
113114
append-timestamp: false
115+
save: ${{ github.event_name != 'pull_request' }}
114116
- name: ./configure
115117
uses: ./.github/actions/configure-macos
116118
with:

NEWS

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,85 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
06 Jun 2024, PHP 8.2.20
4+
5+
- CGI:
6+
. Fixed buffer limit on Windows, replacing read call usage by _read.
7+
(David Carlier)
8+
. Fixed bug GHSA-3qgc-jrrr-25jv (Bypass of CVE-2012-1823, Argument Injection
9+
in PHP-CGI). (CVE-2024-4577) (nielsdos)
10+
11+
- CLI:
12+
. Fixed bug GH-14189 (PHP Interactive shell input state incorrectly handles
13+
quoted heredoc literals.). (nielsdos)
14+
15+
- Core:
16+
. Fixed bug GH-13970 (Incorrect validation of #[Attribute] flags type for
17+
non-compile-time expressions). (ilutov)
18+
. Fixed bug GH-14140 (Floating point bug in range operation on Apple Silicon
19+
hardware). (Derick, Saki)
20+
21+
- DOM:
22+
. Fix crashes when entity declaration is removed while still having entity
23+
references. (nielsdos)
24+
. Fix references not handled correctly in C14N. (nielsdos)
25+
. Fix crash when calling childNodes next() when iterator is exhausted.
26+
(nielsdos)
27+
. Fix crash in ParentNode::append() when dealing with a fragment
28+
containing text nodes. (nielsdos)
29+
30+
- FFI:
31+
. Fixed bug GH-14215 (Cannot use FFI::load on CRLF header file with
32+
apache2handler). (nielsdos)
33+
34+
- Filter:
35+
. Fixed bug GHSA-w8qr-v226-r27w (Filter bypass in filter_var FILTER_VALIDATE_URL).
36+
(CVE-2024-5458) (nielsdos)
37+
38+
- FPM:
39+
. Fix bug GH-14175 (Show decimal number instead of scientific notation in
40+
systemd status). (Benjamin Cremer)
41+
42+
- Hash:
43+
. ext/hash: Swap the checking order of `__has_builtin` and `__GNUC__`
44+
(Saki Takamachi)
45+
46+
- Intl:
47+
. Fixed build regression on systems without C++17 compilers. (Calvin Buckley,
48+
Peter Kokot)
49+
50+
- Ini:
51+
. Fixed bug GH-14100 (Corrected spelling mistake in php.ini files).
52+
(Marcus Xavier)
53+
54+
- MySQLnd:
55+
. Fix bug GH-14255 (mysqli_fetch_assoc reports error from
56+
nested query). (Kamil Tekiela)
57+
58+
- Opcache:
59+
. Fixed bug GH-14109 (Fix accidental persisting of internal class constant in
60+
shm). (ilutov)
61+
62+
- OpenSSL:
63+
. The openssl_private_decrypt function in PHP, when using PKCS1 padding
64+
(OPENSSL_PKCS1_PADDING, which is the default), is vulnerable to the Marvin Attack
65+
unless it is used with an OpenSSL version that includes the changes from this pull
66+
request: https://github.com/openssl/openssl/pull/13817 (rsa_pkcs1_implicit_rejection).
67+
These changes are part of OpenSSL 3.2 and have also been backported to stable
68+
versions of various Linux distributions, as well as to the PHP builds provided for
69+
Windows since the previous release. All distributors and builders should ensure that
70+
this version is used to prevent PHP from being vulnerable. (CVE-2024-2408)
71+
72+
- Standard:
73+
. Fixed bug GHSA-9fcc-425m-g385 (Bypass of CVE-2024-1874).
74+
(CVE-2024-5585) (nielsdos)
75+
76+
- XML:
77+
. Fixed bug GH-14124 (Segmentation fault with XML extension under certain
78+
memory limit). (nielsdos)
79+
80+
- XMLReader:
81+
. Fixed bug GH-14183 (XMLReader::open() can't be overridden). (nielsdos)
82+
383
09 May 2024, PHP 8.2.19
484

585
- Core:

Zend/tests/attributes/021_attribute_flags_type_is_validated.phpt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ Attribute flags type is validated.
66
#[Attribute("foo")]
77
class A1 { }
88

9+
#[A1]
10+
class Foo {}
11+
12+
try {
13+
(new ReflectionClass(Foo::class))->getAttributes()[0]->newInstance();
14+
} catch (Error $e) {
15+
echo $e->getMessage(), "\n";
16+
}
17+
918
?>
10-
--EXPECTF--
11-
Fatal error: Attribute::__construct(): Argument #1 ($flags) must be of type int, string given in %s
19+
--EXPECT--
20+
Attribute::__construct(): Argument #1 ($flags) must be of type int, string given

Zend/tests/attributes/022_attribute_flags_value_is_validated.phpt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ Attribute flags value is validated.
66
#[Attribute(-1)]
77
class A1 { }
88

9+
#[A1]
10+
class Foo { }
11+
12+
try {
13+
var_dump((new ReflectionClass(Foo::class))->getAttributes()[0]->newInstance());
14+
} catch (Error $e) {
15+
echo $e->getMessage(), "\n";
16+
}
17+
918
?>
10-
--EXPECTF--
11-
Fatal error: Invalid attribute flags specified in %s
19+
--EXPECT--
20+
Invalid attribute flags specified

Zend/tests/attributes/023_ast_node_in_validation.phpt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ Attribute flags value is validated.
66
#[Attribute(Foo::BAR)]
77
class A1 { }
88

9+
#[A1]
10+
class Bar { }
11+
12+
try {
13+
var_dump((new ReflectionClass(Bar::class))->getAttributes()[0]->newInstance());
14+
} catch (Error $e) {
15+
echo $e->getMessage(), "\n";
16+
}
17+
918
?>
10-
--EXPECTF--
11-
Fatal error: Class "Foo" not found in %s on line %d
19+
--EXPECT--
20+
Class "Foo" not found
Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
--TEST--
2-
Validation for "Attribute" does not use a scope when evaluating constant ASTs
2+
Validation for "Attribute" uses the class scope when evaluating constant ASTs
33
--FILE--
44
<?php
55
#[Attribute(parent::x)]
66
class x extends y {}
7+
8+
class y {
9+
protected const x = Attribute::TARGET_CLASS;
10+
}
11+
12+
#[x]
13+
class z {}
14+
15+
var_dump((new ReflectionClass(z::class))->getAttributes()[0]->newInstance());
716
?>
8-
--EXPECTF--
9-
Fatal error: Cannot access "parent" when no class scope is active in %s on line %d
17+
--EXPECT--
18+
object(x)#1 (0) {
19+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--TEST--
2+
Attribute flags type is not validated at compile time.
3+
--FILE--
4+
<?php
5+
6+
#[Attribute("foo")]
7+
class A1 { }
8+
9+
?>
10+
===DONE===
11+
--EXPECT--
12+
===DONE===

Zend/tests/gh14009_001.phpt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
--TEST--
2+
GH-14009: Traits inherit prototype
3+
--FILE--
4+
<?php
5+
6+
class P {
7+
protected function common() {
8+
throw new Exception('Unreachable');
9+
}
10+
}
11+
12+
class A extends P {
13+
public function test(P $sibling) {
14+
$sibling->common();
15+
}
16+
}
17+
18+
class B extends P {
19+
protected function common() {
20+
echo __METHOD__, "\n";
21+
}
22+
}
23+
24+
trait T {
25+
protected function common() {
26+
echo __METHOD__, "\n";
27+
}
28+
}
29+
30+
class C extends P {
31+
use T;
32+
}
33+
34+
$a = new A();
35+
$a->test(new B());
36+
$a->test(new C());
37+
38+
?>
39+
--EXPECT--
40+
B::common
41+
T::common

0 commit comments

Comments
 (0)