Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-2176

Illegal offset type in isset or empty in UnitOfWork


    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.3, 2.4
    • Fix Version/s: None
    • Component/s: ORM
    • Labels:


      Steps to reproduce the problem?

      • A custom DBAL type, that extends a scalar build-in type e.g. DBAL\Types\StringType
      • convertToPHPValue of custom DBAL type returns an instance of a class (implements __toString method)
      • Custom DBAL type is used as primary key in an entity
      • initially persist entity and flush entity manager
      • modify entity (keep same primary key) and persist entity again causes:

        Warning: Illegal offset type in isset or empty in vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php line 2407

      I guess the solution in Doctrine\ORM\Internal\Hydration namespace by explicit converting result of convertToPHPValue if result is not a scalar value.

        Issue Links


          godzilla80 Yves Berkholz created issue -
          beberlei Benjamin Eberlei made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Duplicate [ 3 ]
          relaxnow Boy Baukema made changes -
          Affects Version/s 2.4 [ 10321 ]
          ocramius Marco Pivetta made changes -
          Link This issue duplicates DDC-1998 [ DDC-1998 ]


            • Assignee:
              beberlei Benjamin Eberlei
              godzilla80 Yves Berkholz
            • Votes:
              0 Vote for this issue
              4 Start watching this issue


              • Created: