Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
package
money
Commits
30c716d7
Commit
30c716d7
authored
Jan 22, 2014
by
Thorsten Buss
Browse files
FIX: wrong type returned, so in some cases there shows an Exception on parsing an Amount
parent
8038347e
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/Money/Money.php
View file @
30c716d7
...
...
@@ -330,7 +330,7 @@ class Money
throw
new
InvalidArgumentException
(
sprintf
(
'The string "%s" could not be parsed as money'
,
$string
));
}
$units
=
(
float
)(
@
$matches
[
1
]
.
@
$matches
[
2
]
.
@
$matches
[
3
]
.
'.'
.
@
$matches
[
4
])
*
100
;
return
round
(
$units
);
return
(
int
)
round
(
$units
);
}
/**
...
...
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