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

Add Countable to implemented interfaces when appropriate #688

merged 1 commit into from Jun 16, 2019


None yet
6 participants
Copy link

commented Jun 1, 2019

This PR addresses #619

List of classes that implement IteratorAggregate without a count method:

  • Mage_Sales_Model_Entity_Sale_Collection
  • Zend_Db_Table_Row_Abstract
  • Zend_Db_Statement_Pdo
  • Zend_Rest_Client_Result
  • Zend_Rest_Client_Result
  • Zend_TimeSync

This comment has been minimized.

Copy link

commented Jun 1, 2019

Maybe want to add Varien_Simplexml_Element?

$xml = new Varien_Simplexml_Element('<data><a></a><b></b><c></c></data>');
 ------ -------------------------------------------------------------- 
  11     Parameter #1 $var of function count expects array|Countable,  
         Varien_Simplexml_Element given.                               
 ------ -------------------------------------------------------------- 

(SimpleXMLElement implements Countable, but properbly not correct. Read it will be fixed in PHP7.4)

@sreichel sreichel merged commit a17e29a into OpenMage:1.9.4.x Jun 16, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.