You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 10, 2019. It is now read-only.
Warning: A non-numeric value encountered in /app/code/core/Mage/Shipping/Model/Carrier/Abstract.php on line 466 in system.log on shipping calculation on checkout.
Just to be clear, checkout works fine, only logs are bloated.
PHP 7.1 throws warnings on things like 1 + '', so I'm opening this issue to write them down.
In this case default handling_fee config value for all shipping methods should be zero and not blank/null. $handlingFee = $this->getConfigData('handling_fee');
To avoid warning, we can
copy Abstract to local/Mage and cast handling_fee to (float)
just set Handling Fee: 0 for enabled shipping methods in administration (write this in wiki?)
make field required through system.xml, so zero needs to be entered, set value to zero through config.xml
I'm not sure how many similar cases there are, especially with config values, so it's hard to know best approach.
I think more similar warnings will pop up on 7.1, so please submit them when you see them, we need input :)
The text was updated successfully, but these errors were encountered:
I guess Wiki for PHP 7.1 + default in config.xml is the least intrusive way, which is one of the principles we've followed so far in this extension. And it will be easy to add fixes for any more cases like this that users report.
I encountered the same problem with PHP 7.1 for the file app/design/adminhtml/default/default/template/catalog/product/tab/inventory.phtml in Line 80 using Magento 1.9.3.6 when creating a Product. Happens directly when trying to saving the Attribute set and Attribute Type (after the first step basically)
I'm not sure if the min_sale_qty is set by default or if we removed it in our project, but fact of the matter is we have no min_sale_qty configured right now and thus the issue is triggered.
One quick fix is to cast to (int) which displays 0 in the min_sale_qty input as expected
Setting it in the config.xml is probably a better idea though (you have to either configure which groups have which min_sale_qty or configure one qty for all - theres a dropdown for that).
@ivanweiler did a lot of work for PHP7.1 compatibility and the 3.0 release. But these changes are only in the develop branch for now. What is stopping you from merging it to the master branch?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Magento 1.9.3.1 (clean install + sample data), PHP 7.1.0
Warning: A non-numeric value encountered in /app/code/core/Mage/Shipping/Model/Carrier/Abstract.php on line 466
in system.log on shipping calculation on checkout.Just to be clear, checkout works fine, only logs are bloated.
PHP 7.1 throws warnings on things like
1 + ''
, so I'm opening this issue to write them down.In this case default handling_fee config value for all shipping methods should be zero and not blank/null.
$handlingFee = $this->getConfigData('handling_fee');
To avoid warning, we can
I'm not sure how many similar cases there are, especially with config values, so it's hard to know best approach.
I think more similar warnings will pop up on 7.1, so please submit them when you see them, we need input :)
The text was updated successfully, but these errors were encountered: