|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54357 setting an attribute on a cloned numberformatter crashes PHP
Submitted: 2011-03-23 10:15 UTC Modified: 2011-03-24 09:30 UTC
From: bart at burgov dot nl Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 5.3.5 OS: Windows 7 64-bit
Private report: No CVE-ID: None
 [2011-03-23 10:15 UTC] bart at burgov dot nl
The script below crashes on the ->setAttribute() command. Setting the attribute on $nf works fine.

Test script:
$nf = new NumberFormatter('nl-NL', NumberFormatter::TYPE_DEFAULT);
$cnf = clone $nf;
$cnf->setAttribute(NumberFormatter::MIN_FRACTION_DIGITS, 1);

Expected result:
I expect it not to crash

Actual result:
It crashes ("CLI has stopped working")


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-24 07:34 UTC]
-Status: Open +Status: Feedback
 [2011-03-24 07:34 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read for *NIX and for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

I can't reproduce this on Linux, so it may be platform specific.
 [2011-03-24 09:30 UTC] bart at burgov dot nl
-Status: Feedback +Status: Closed -PHP Version: 5.3.6 +PHP Version: 5.3.5
 [2011-03-24 09:30 UTC] bart at burgov dot nl
Apparently I didn't have 5.3.6 but 5.3.5, the bug seems to be fixed in the latest PHP version.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 22:01:33 2024 UTC