Skip to content

FIX: remove not used count() from templates #12901

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

Merged
merged 1 commit into from
Jan 9, 2018
Merged

FIX: remove not used count() from templates #12901

merged 1 commit into from
Jan 9, 2018

Conversation

coderimus
Copy link
Contributor

@coderimus coderimus commented Dec 28, 2017

Dear Magento2,
The main goal of this PR is to remove not used count($_items) in templates. Please, check Description section for details.

Thank you,
Alex

Description

Found that in some templates Magento2 counts items for table rendering and other stuff but files, add to this PR, do not use $_count variable and <?php $_count = count($_items) ?> can be excluded from them.

Fixed Issues (if relevant)

Not related issue found.

Manual testing scenarios

No need to be tested because just removing a not used variable from templates.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@orlangur orlangur self-assigned this Dec 28, 2017
@coderimus
Copy link
Contributor Author

Hello @orlangur can you please review this PR when you will have a time? :)
Many thanks,
Alex

@orlangur orlangur added this to the January 2018 milestone Jan 5, 2018
@magento-team magento-team merged commit 35a6ebb into magento:2.2-develop Jan 9, 2018
continue;
} ?>
<?php if ($_item->getOrderItem()->getParentItem()): ?>
continue;
Copy link
Contributor

@ihor-sviziev ihor-sviziev Jan 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continue; will be shown. It is regression. Am I wrong?
@orlangur could you check it?

It was merged "as is" in 0d04ec6

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ihor-sviziev @orlangur thank you for your review. Yep, it was an error. Thanks once more for your help!

continue;
} ?>
<?php if ($_item->getOrderItem()->getParentItem()): ?>
continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same issue it there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ihor-sviziev Thank you so much for your review. Sorry, it was my fail :(

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderimus no problem. I just created new PR that fixing this issue

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.

4 participants