-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed currency convert exception #790
Fixed currency convert exception #790
Conversation
Seems this could have been fixed with impact to only one line of code using something like:
|
Nice, this was on my to-do list, too. |
@colinmollenhour class names are pretty long in Magento 1, so I am not sure your suggestion is easier to read. Especially if a method call (getter) occurs. |
Sure, but the main motivation is +1,-1 lines changed instead of +13,-6. Fewer lines changed, less chance for regression or future conflict. |
Changed. Now it is one line change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!
Parameter
$toCurrency
can benull
orstring
orMage_Directory_Model_Currency
object. If$toCurrency
isstring
and rate doen't exists then we have fatal error (Call to a member function ... on string
against exception. This is fix for described problem.