--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: php-net-url2: Compilation failed: digits missing after \x or in \x{} or \o{} or \N{U+} at offset 3 in /usr/share/php/Net/URL2.php on line 1200
- From: Andras Galos <galosa@netinform.hu>
- Date: Tue, 16 Sep 2025 08:36:42 +0200
- Message-id: <175800460216.2160706.8277081309167451998.reportbug@cebece.pomaz.hu>
Package: php-net-url2
Version: 2.2.1-0.2
Severity: important
Dear Maintainer,
First off, thank you for your work on the Debian version of the package!
The issue is, that after upgrading to Debian 13, a preg_replace_callback() error kicks in with the more strict regexp handling of PHP 8.4:
This regexp fails in /usr/share/php/Net/URL2.php in line 1201:
([\x-\x20\x22\x3C\x3E\x7F-\xFF]+)
Produces a warning:
PHP Warning: preg_replace_callback(): Compilation failed: digits missing after \x or in \x{} or \o{} or \N{U+} at offset 3 in /usr/share/php/Net/URL2.php on line 1200
But returns null for all string inputs, which breaks PHP applications, since with PHP8.2 it returned the input string untouched.
I bumped into this problem with Roundcube's calendar plugin working with a Radicale CalDAV server, which resulted missing remote calendars in the Roundcube webmail, after upgrading to Debian 13.
The correct regexp, which works as expected in PHP 8.4 too:
([\x00-\x20\x22\x3C\x3E\x7F-\xFF]+)
The regexp changes of PHP 8.4 are documented here: https://php.watch/versions/8.4/pcre2-regexp-syntax-changes
The issue has already been corrected in version 2.2.3 of Net_URL2 on Pear.
Please update the Debian package to 2.2.3 or at least backport this particualar correction.
Until that, manually correcting this single line regexp in /usr/share/php/Net/URL2.php solves the problem.
In case you need any more information on this, I'd be glad to help!
Thank you in advance,
Andras Galos
-- System Information:
Debian Release: 13.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.43+deb13-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages php-net-url2 depends on:
ii php-common 2:96
php-net-url2 recommends no packages.
php-net-url2 suggests no packages.
-- no debconf information
--- End Message ---