You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there was any pass-by-reference arguments (e.g. foo(MyObj &$obj)) the object by reference will be replaced by formatted array.
Example:
public function testFoo()
{
$a = new \stdClass();
var_dump($a);
$this->foo($a);
var_dump($a);
}
public function foo(\stdClass &$a)
{
$b = [];
$b = $b['non-existing'];
}
We solved the issue by recursivly converting record to array of simple type fields. Objects are converted to array through bsonSerialize, jsonSerialize or reflections
Steps to reproduce
Error handler:
Next in MongoDBFormatter::formatArray we have
If there was any pass-by-reference arguments (e.g.
foo(MyObj &$obj)
) the object by reference will be replaced by formatted array.Example:
Output:
The text was updated successfully, but these errors were encountered: