|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-05-08 03:34 UTC] corey dot taylor dot fl at gmail dot com
-Summary: Unable to close NumberFormatter after failed parse()
+Summary: Unable to clone NumberFormatter after failed parse()
[2021-05-08 03:34 UTC] corey dot taylor dot fl at gmail dot com
[2021-05-09 11:57 UTC] cmb@php.net
-Package: Unknown/Other Function
+Package: intl
[2021-05-12 22:52 UTC] corey dot taylor dot fl at gmail dot com
[2021-05-17 14:17 UTC] nikic@php.net
-Status: Open
+Status: Verified
[2021-05-17 14:17 UTC] nikic@php.net
[2021-05-17 14:33 UTC] git@php.net
[2021-05-17 14:33 UTC] git@php.net
-Status: Verified
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 06:00:02 2025 UTC |
Description: ------------ After calling `NumberFormatter::parse()` with an invalid string, cloning the NumberFormatter instance throws a Fatal Error: $format = new NumberFormatter('en_US', NumberFormatter::DECIMAL); $format->parse('abc'); clone $format; Fatal error: Uncaught Exception: Failed to clone NumberFormatter object https://3v4l.org/XGVWZ This seems to only occur with PHP 8.0+. Since `parse()` returns false on error, I wouldn't expect it to invalidate the object. I was not sure what category this bug report falls under.