Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Fix Calls to count()#97

Merged
joanhe merged 20 commits into
libs-upgradefrom
fix-calls-count
Mar 27, 2018
Merged

Fix Calls to count()#97
joanhe merged 20 commits into
libs-upgradefrom
fix-calls-count

Conversation

@bbatsche

Copy link
Copy Markdown
Contributor

Description

Add logic and checks to avoid passing null to count() and make sure that any classes with a public count() method implement Countable interface.

Fixed Issues (if relevant)

  1. Warning: count(): Parameter must be an array or an object that implements Countable #7: Warning: count(): Parameter must be an array or an object that implements Countable

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)

@bbatsche bbatsche requested a review from buskamuza March 19, 2018 20:30

@buskamuza buskamuza left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please run builds and fix issues with count()

*/
namespace Magento\Test\Bootstrap;

ob_start();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@joanhe Is there a reason for this? I feel like it definitely does not belong here

@joanhe joanhe Mar 22, 2018

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@bbatsche This is to resolve test failure in php 7.2.
session_id(): Cannot change session id when headers already sent in

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Maybe try adding this right above the call that's failing, or somewhere in one of the setUp*() methods. No code or function calls should be in this file and not inside of the class itself.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is the only place works.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants