mikemccabe/json-patch-php — pull request #4 by bendiy (2013-08-15 22:30:05+00:00)
Title: If src assoc is empty and dst is not, do a full replace.

This should address situations where you have:
```
// $src
{
"foo": null
}

// $dst
{
"foo": [
{
"bar": "baz"
},
{
"bar2": "baz2"
}
]
}
```
Previously, this would try to do an add to foo for each array child, but since foo was null, you would get an error applying the patch because you can't add to null. It wasn't an object yet.