{"action":"closed","issue":{"url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/449","repository_url":"https://api.github.com/repos/mongodb/mongo-php-library","labels_url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/449/labels{/name}","comments_url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/449/comments","events_url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/449/events","html_url":"https://github.com/mongodb/mongo-php-library/issues/449","id":281686857,"number":449,"title":"Client Error: bad object in message for a very specific find query","user":{"login":"xprt64","id":915088,"avatar_url":"https://avatars2.githubusercontent.com/u/915088?v=4","gravatar_id":"","url":"https://api.github.com/users/xprt64","html_url":"https://github.com/xprt64","followers_url":"https://api.github.com/users/xprt64/followers","following_url":"https://api.github.com/users/xprt64/following{/other_user}","gists_url":"https://api.github.com/users/xprt64/gists{/gist_id}","starred_url":"https://api.github.com/users/xprt64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xprt64/subscriptions","organizations_url":"https://api.github.com/users/xprt64/orgs","repos_url":"https://api.github.com/users/xprt64/repos","events_url":"https://api.github.com/users/xprt64/events{/privacy}","received_events_url":"https://api.github.com/users/xprt64/received_events","type":"User","site_admin":false},"labels":[{"id":154290679,"url":"https://api.github.com/repos/mongodb/mongo-php-library/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"jmikola","id":244663,"avatar_url":"https://avatars3.githubusercontent.com/u/244663?v=4","gravatar_id":"","url":"https://api.github.com/users/jmikola","html_url":"https://github.com/jmikola","followers_url":"https://api.github.com/users/jmikola/followers","following_url":"https://api.github.com/users/jmikola/following{/other_user}","gists_url":"https://api.github.com/users/jmikola/gists{/gist_id}","starred_url":"https://api.github.com/users/jmikola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmikola/subscriptions","organizations_url":"https://api.github.com/users/jmikola/orgs","repos_url":"https://api.github.com/users/jmikola/repos","events_url":"https://api.github.com/users/jmikola/events{/privacy}","received_events_url":"https://api.github.com/users/jmikola/received_events","type":"User","site_admin":false},"assignees":[{"login":"jmikola","id":244663,"avatar_url":"https://avatars3.githubusercontent.com/u/244663?v=4","gravatar_id":"","url":"https://api.github.com/users/jmikola","html_url":"https://github.com/jmikola","followers_url":"https://api.github.com/users/jmikola/followers","following_url":"https://api.github.com/users/jmikola/following{/other_user}","gists_url":"https://api.github.com/users/jmikola/gists{/gist_id}","starred_url":"https://api.github.com/users/jmikola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmikola/subscriptions","organizations_url":"https://api.github.com/users/jmikola/orgs","repos_url":"https://api.github.com/users/jmikola/repos","events_url":"https://api.github.com/users/jmikola/events{/privacy}","received_events_url":"https://api.github.com/users/jmikola/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2017-12-13T09:54:36Z","updated_at":"2018-03-22T17:11:48Z","closed_at":"2018-03-22T17:11:48Z","author_association":"NONE","body":"There is a special find query that fails with the message: `Client Error: bad object in message: bson length doesn't match what we found in object with unknown _id`\r\n\r\nOne can change the characters but not the length of strings and obtain the same exception.\r\nIf the order of fields is swapped then the exception is not thrown anymore.\r\n\r\nThe UnitTest I used to reproduce is this:\r\n\r\n```\r\nuse MongoDB\\BSON\\ObjectID;\r\nuse MongoDB\\BSON\\Regex;\r\n\r\nclass SpecialFindTest extends FunctionalTestCase\r\n{\r\n    /** should not throw exception */\r\n    public function testSpecification()\r\n    {\r\n        $this->collection->findOne([\r\n            '_______'                             => new ObjectID('111111111111111111111111'),\r\n            '___________________________________' => new Regex('_______________________________________________________', 'i'),\r\n        ]);\r\n    }\r\n}\r\n```\r\n\r\n**Environment:**\r\nMongoDB extension version: 1.3.4\r\nlibbson bundled version: 1.8.2\r\nlibmongoc bundled version: 1.8.2\r\nmongodb/mongodb: 1.2.0\r\nPHP 7.1.11-0ubuntu0.17.10.1 (cli) (built: Nov  1 2017 16:30:52) ( NTS )\r\nPHP 7.1.3 (cli) (built: Mar 21 2017 23:12:30) ( NTS )\r\nCopyright (c) 1997-2017 The PHP Group\r\nZend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies\r\n    with Zend OPcache v7.1.3, Copyright (c) 1999-2017, by Zend Technologies\r\n\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"jmikola"}}