Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-3219

Ensure PersistentCollection->count() is of type int

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: Git Master
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None
    • Environment:
      SQL Server 2012

      Description

      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

        Activity

        Hide
        Flip added a comment -

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

        Show
        Flip added a comment - My colleague told me that it was his mistake somehow, so i don't know how valid this really is !!!

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Flip
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: