runner36 / rock-php

Automatically exported from code.google.com/p/rock-php
0 stars 0 forks source link

Empty hash {} is being converted to empty array [] #244

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Found a very wierd bug, that broke my application.

What steps will reproduce the problem?

1. If you insert such document:
{
  "arr": [
    {
      "param1": "val1"
    },
    {
      "param2": "val2"
    },
    {}
  ]
}
(note the last item in array is an empty hash)

2. And then will view it in RockMongo, or open for update, or export it you 
will see next:
{
  "arr": [
    {
      "param1": "val1"
    },
    {
      "param2": "val2"
    },
    [

    ]
  ]
}
(note the last item in array was converted to array)

What is the expected output? What do you see instead?

There should be a hash.

RockMongo Version (RockMongo v1.1.5)

Operation System (WindowsXP SP3)

PHP Version (5.3.16)

php_mongo Version (mongo/1.2.7-)

MongoDB version (2.0.7-rc0)

Please provide any additional information below.

Original issue reported on code.google.com by yura....@gmail.com on 5 Apr 2013 at 6:32

GoogleCodeExporter commented 8 years ago
I second this for RockMongo-on-Windows. Mostly annoying and almost embracing. 
Is there an workaround?

Original comment by spown...@mail.ru on 16 Apr 2013 at 8:33

GoogleCodeExporter commented 8 years ago
also on Linux Debian

Original comment by stefano.cudini on 12 Mar 2014 at 11:21