Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.

Argument 1 passed to migrate() must be of the type array, null given #124

Open
likebtn opened this issue Sep 23, 2016 · 2 comments
Open

Comments

@likebtn
Copy link

likebtn commented Sep 23, 2016

Hi,

I am getting the following error when calling findOneBy() and the document is found (it happens with some documents):

PHP Catchable fatal error: Argument 1 passed to Doctrine\ODM\CouchDB\Migrations\NullMigration::migrate() must be of the type array, null given, called in /vendor/doctrine/couchdb-odm/lib/Doctrine/ODM/CouchDB/UnitOfWork.php on line 168 and defined in /vendor/doctrine/couchdb-odm/lib/Doctrine/ODM/CouchDB/Migrations/NullMigration.php on line 30

Stack trace:

PHP 9. Doctrine\ODM\CouchDB\DocumentRepository->findOneBy() /src/Acme/MyBundle/AcmeMyBundle.php:1532

PHP 10. Doctrine\ODM\CouchDB\DocumentRepository->findBy() /vendor/doctrine/couchdb-odm/lib/Doctrine/ODM/CouchDB/DocumentRepository.php:171

PHP 11. Doctrine\ODM\CouchDB\View\ODMQuery->execute() /vendor/doctrine/couchdb-odm/lib/Doctrine/ODM/CouchDB/DocumentRepository.php:145

PHP 12. Doctrine\ODM\CouchDB\UnitOfWork->createDocument() /vendor/doctrine/couchdb-odm/lib/Doctrine/ODM/CouchDB/View/ODMQuery.php:47

PHP 13. Doctrine\ODM\CouchDB\Migrations\NullMigration->migrate() /vendor/doctrine/couchdb-odm/lib/Doctrine/ODM/CouchDB/UnitOfWork.php:168
@likebtn
Copy link
Author

likebtn commented Sep 23, 2016

By some reason "doc" is empty in response in execute() in /vendor/doctrine/couchdb-odm/lib/Doctrine/ODM/CouchDB/View/ODMQuery.php:

Doctrine\CouchDB\HTTP\Response Object
(
    [status] => 200
    [headers] => Array
        (
            [connection] => Keep-Alive
            [version] => 1.1
            [status] => 200
            [transfer-encoding] => chunked
            [server] => CouchDB/1.5.0 (Erlang OTP/R16B03)
            [etag] => "EZWGRJ67FTX8F4Z6W7BZW8X4U"
            [date] => Fri, 23 Sep 2016 06:40:45 GMT
            [content-type] => text/plain; charset=utf-8
            [cache-control] => must-revalidate
        )

    [body] => Array
        (
            [total_rows] => 70739
            [offset] => 18619
            [rows] => Array
                (
                    [0] => Array
                        (
                            [id] => 546a029f9b1d1bd32f400d92
                            [key] => Array
                                (
                                    [0] => Acme.MyBundle.CouchDocument.Links
                                    [1] => id
                                    [2] => 546a029f9b1d1bd36f700d92
                                )

                            [value] => Array
                                (
                                    [_id] => 546a029f9b1d1bd36f700d92
                                    [_rev] => 66-459d2c0f2c2d99bee4184252e996bc29
                                    [type] => Acme.MyBundle.CouchDocument.Links
                                    [url] => 'http://test.com'
                                )

                            [doc] =>
                        )

                )

        )

)

@likebtn
Copy link
Author

likebtn commented Sep 23, 2016

#125 Fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant