DDC-3219: Ensure PersistentCollection->count() is of type int #4005

Open
doctrinebot opened this Issue Jul 21, 2014 · 1 comment

2 participants

@doctrinebot

Jira issue originally created by user flip101:

https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/PersistentCollection.php#L566-L577 does not always return an int. How do i know this? because i compare this count with a php count() with strict checking.

If ($collection->count() !== count($somethingElse)) {
throw new Exception($collection->count() . ' is different then ' . count($somethingElse));
}

and at one time this message showed: 3 is different then 3

@doctrinebot

Comment created by flip101:

My colleague told me that it was his mistake somehow, so i don't know how valid this really is !!!

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment