Public bug reported:
When xdebug is enabled, throwing a DateMalformedStringException results
in a error about trying to set a dynamic property on the exception
object.
Test code:
# cat test.php
<?php
try {
new DateTime('asdf');
} catch (DateMalformedStringException $e) {
echo "Invalid date!\n";
}
Expected result (this works when xdebug is disabled):
# php test.php
Invalid date!
Actual result:
# php test.php
PHP Fatal error: Uncaught DateMalformedStringException: Failed to parse
time string (asdf) at position 0 (a): The timezone could not be found in the
database in /test.php:3
Stack trace:
#0 /test.php(3): DateTime->__construct()
#1 {main}
Next Error: Cannot create dynamic property
DateMalformedStringException::$xdebug_message in /test.php:3
Stack trace:
#0 /test.php(3): DateTime->__construct()
#1 {main}
thrown in /test.php on line 3
Ubuntu version:
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04.3 LTS"
PHP version:
# apt-cache policy php8.3-cli php8.3-xdebug
php8.3-cli:
Installed: 8.3.6-0ubuntu0.24.04.5
Candidate: 8.3.6-0ubuntu0.24.04.5
Version table:
*** 8.3.6-0ubuntu0.24.04.5 500
500 http://archive.ubuntu.com/ubuntu noble-updates/main amd64
Packages
500 http://security.ubuntu.com/ubuntu noble-security/main amd64
Packages
100 /var/lib/dpkg/status
8.3.6-0maysync1 500
500 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages
php8.3-xdebug:
Installed: 3.2.0+3.1.6+2.9.8+2.8.1+2.5.5-3ubuntu1
Candidate: 3.2.0+3.1.6+2.9.8+2.8.1+2.5.5-3ubuntu1
Version table:
*** 3.2.0+3.1.6+2.9.8+2.8.1+2.5.5-3ubuntu1 500
500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages
100 /var/lib/dpkg/status
** Affects: xdebug (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2122433
Title:
Cannot create dynamic property
DateMalformedStringException::$xdebug_message
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xdebug/+bug/2122433/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs