[DoctrineMongoDBBundle] updated logging to support new embedded document in \stdClass
This commit is contained in:
parent
d693759312
commit
92653bf827
@ -68,11 +68,10 @@ class DoctrineMongoDBLogger
|
||||
*
|
||||
* @return string A serialized object for the log
|
||||
*/
|
||||
static protected function formatQuery(array $query)
|
||||
static protected function formatQuery(array $query, $array = true)
|
||||
{
|
||||
$parts = array();
|
||||
|
||||
$array = true;
|
||||
foreach ($query as $key => $value) {
|
||||
if (!is_numeric($key)) {
|
||||
$array = false;
|
||||
@ -98,6 +97,8 @@ class DoctrineMongoDBLogger
|
||||
$formatted = 'new MaxKey()';
|
||||
} elseif ($value instanceof \MongoBinData) {
|
||||
$formatted = 'new BinData("'.$value->bin.'", "'.$value->type.'")';
|
||||
} elseif ($value instanceof \stdClass) {
|
||||
$formatted = static::formatQuery((array) $value, false);
|
||||
} else {
|
||||
$formatted = (string) $value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user