Doctrine MongoDB ODM
  1. Doctrine MongoDB ODM
  2. MODM-62

PHP warning when array is replaced with ArrayCollection: array_udiff_assoc(): Argument #2 is not an array

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0BETA2
    • Component/s: Persister
    • Labels:
      None

      Description

      Simple test case to reproduce:

      /** @Document(db="tests", collection="tests") */
      class a {
          /** @Id */
          protected $id;
      
          /** @Collection */
          protected $b = array('test');
      
          function setB($b) {$this->b = $b;}
      }
      
      $a = new a();
      $dm->persist($a);
      $dm->flush();
      $dm->refresh($a);
      
      $a->setB(new ArrayCollection(array('test')));
      $dm->persist($a);
      $dm->flush();
      

      Getting PHP warning:

      PHP Warning:  array_udiff_assoc(): Argument #2 is not an array in Doctrine\ODM\MongoDB\Persisters\BasicDocumentPersister.php on line 458
      

        Activity

        Vladimir Razuvaev created issue -
        Show
        Jonathan H. Wage added a comment - Thanks, fixed in http://github.com/doctrine/mongodb-odm/commit/c12c9239cf152b4764da07b2bc89bfc6967a9569
        Jonathan H. Wage made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.0.0BETA2 [ 10092 ]
        Resolution Fixed [ 1 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=MODM-62, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Vladimir Razuvaev
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: