Skip to content

Commit 37455f4

Browse files
akurthktomk
authored andcommitted
Fix _encodeData regexp
\x was used shorthand for \x00 since fca283a ("Reviewed: preg_* patterns and callbacks", 2013-12-28). In libpcre2 10.45 the shorthand was removed in 97a2937 ("Add fix and tests for \x with no hex digits", 2024-09-17).
1 parent 53f833c commit 37455f4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Net/URL2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ protected function parseUrl($url)
12191219
private function _encodeData($url)
12201220
{
12211221
return preg_replace_callback(
1222-
'([\x-\x20\x22\x3C\x3E\x7F-\xFF]+)',
1222+
'([\x00-\x20\x22\x3C\x3E\x7F-\xFF]+)',
12231223
array($this, '_encodeCallback'), $url
12241224
);
12251225
}

package.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
3232
<active>no</active>
3333
</lead>
3434

35-
<date>2025-03-11</date>
35+
<date>2025-03-12</date>
3636
<time>00:00:00</time>
3737
<version>
3838
<release>2.2.3-dev</release>
@@ -44,6 +44,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
4444
</stability>
4545
<license uri="https://spdx.org/licenses/BSD-3-Clause">BSD-3-Clause</license>
4646
<notes>
47+
* Fix: libpcre2 10.45 compat: _encodeData \x shorthand for \x00 (Request #29032)
4748
* Fix: PHP 8.4 compat: URL2: Make $array non optional in _queryArrayByBrackets (Bug #28649)
4849
* Imp: Update CI to GitHub Actions
4950
* Imp: Exclude dev files from Composer package

0 commit comments

Comments
 (0)