Closed carpio88 closed 8 years ago
yes. bug is reproduced. will be fixed soon
this might was there from begining: https://github.com/sokil/php-mongo/blob/1.12.0/src/Operator.php#L36-L38
it was ptotection from passing modifiers o_O https://github.com/sokil/php-mongo/commit/8d23d7c3b5beef44133b82ac1b035fc85d581a48 added in v.1.6.3
may you check your code on branch "test_push"? I'll cover more cases soon and marge to master, if all will be good.
thanks for your fast reply. I've tested your code from the branch. So far it's working fine :+1:
ok. i'l do more tests and merge it tommorow. thenk you for bug report
After updating from a fairly old version (1.12.x) to 1.19 yesterday, I've expirenced some issues with the push function.
When I push a dictionary into an array which already has one element, the added value will be transformed from a dictionary to an array.
e.g. the current situation in the DB document looks like this:
a new element should be added to the array with the same structure by using the doc->push() function, as follows:
the result is the following structure
I would appreciate your help with this. thanks a lot in advance.