php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #56939 Filter Float don't check locales.
Submitted: 2006-04-06 12:27 UTC Modified: 2006-05-13 21:56 UTC
From: reiv4x at free dot fr Assigned: pajoye (profile)
Status: Closed Package: filter (PECL)
PHP Version: 5.1.1 OS: Gentoo Linux
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.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: reiv4x at free dot fr
New email:
PHP Version: OS:

 

 [2006-04-06 12:27 UTC] reiv4x at free dot fr
Description:
------------
Hi!
I try code below with my langage (French) and i didn't 
find a good result.
I use "," in french for float separator.
For english it's not "," for thousand number ?
PHP5.1.2


Reproduce code:
---------------
<?php
//$_GET['myfloat'] == '10,42';
$source = INPUT_GET;
$name = 'myfloat';
$ret = input_get($source, $name, FILTER_VALIDATE_FLOAT);
var_dump($ret);
?>


Expected result:
----------------
float(10.4)


Actual result:
--------------
NULL


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-08 12:28 UTC] pierre dot php at gmail dot com
I have a patch to support custom decimal. 

http://pecl.php.net/~pierre/filter_float_add_custom_seps_and_pcre.txt

It requires some small modifications to be applied to the current pecl code. I'll commit it as soon as we agreed on this feature.

Assigned to me.
 [2006-05-13 21:56 UTC] pierre dot php at gmail dot com
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC