Skip to content
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

Fix undefined offset notice when no order states are set #4903

Merged
merged 2 commits into from
May 24, 2017

Conversation

adragus-inviqa
Copy link
Contributor

@adragus-inviqa adragus-inviqa commented Jun 6, 2016

When the DB has no order states (or just missing non-visible, or visible ones), M2 throws with Notice: Undefined offset: 1/0 in /vagrant/vendor/magento/module-sales/Model/Order/Config.php on line 256.

You can argue that M2 shouldn't take into consideration invalid DBs, and I would just slightly agree with you there, but, for such a small fix, why bother arguing that in the first place, eh? I've also added an un-related strict checking.

When the DB has no order states (or just missing non-visible, or visible ones), M2 throws with `Notice: Undefined offset: 1 in /vagrant/vendor/magento/module-sales/Model/Order/Config.php on line 256`.

You can argue that M2 shouldn't take into consideration invalid DBs, and I would just slightly agree with you, but, for such a small fix, why bother arguing that in the first place, eh?
@aakimov
Copy link
Contributor

aakimov commented Aug 31, 2016

Hello @adragus-inviqa,

Thank you for contribution and sorry for the response delay.
Your pull request is accepted and will be merged to our codebase.
Internal ticket number is MAGETWO-57854.

@Ctucker9233
Copy link

What's the status on this?

@vrann vrann self-assigned this May 19, 2017
@vrann vrann added this to the May 2017 milestone May 19, 2017
@vrann vrann added the develop label May 19, 2017
@magento-team magento-team merged commit 9dd09c6 into magento:develop May 24, 2017
@magento-team
Copy link
Contributor

@adragus-inviqa thank you for your contribution to Magento 2 project

@adragus-inviqa adragus-inviqa deleted the patch-3 branch May 25, 2017 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants