Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
Helpers
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Modulus
Helpers
Commits
922dbcc5
Commit
922dbcc5
authored
May 18, 2020
by
Sylvain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert - bug string_to_float
parent
85e88bd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/convert.php
src/convert.php
+3
-1
No files found.
src/convert.php
View file @
922dbcc5
...
...
@@ -194,7 +194,9 @@ if ( !function_exists('string_to_float')) {
function
string_to_float
(
$value
)
{
if
(
!
is_null
(
$value
))
{
return
floatval
(
str_replace
(
','
,
'.'
,
$value
));
$string
=
str_replace
(
' '
,
''
,
$value
);
$string
=
str_replace
(
','
,
'.'
,
$string
);
return
floatval
(
$string
);
}
else
{
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment