php.net |  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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bart at burgov dot nl
New email:
PHP Version: OS:

 

 [2011-03-23 10:15 UTC] bart at burgov dot nl
Description:
------------
The script below crashes on the ->setAttribute() command. Setting the attribute on $nf works fine.

Test script:
---------------
<?php
$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")

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-24 07:34 UTC] aharvey@php.net
-Status: Open +Status: Feedback
 [2011-03-24 07:34 UTC] aharvey@php.net
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
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php 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: Fri Dec 27 05:01:27 2024 UTC