mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-30 08:21:05 +02:00
Normalization of arrays containing self references (#1050)
Backport normalization fix from master to 1.x
This commit is contained in:
committed by
Jordi Boggiano
parent
6e1793e966
commit
0d993d84d1
@@ -193,6 +193,15 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals(@json_encode(array($foo, $bar)), $res);
|
||||
}
|
||||
|
||||
public function testCanNormalizeReferences()
|
||||
{
|
||||
$formatter = new NormalizerFormatter();
|
||||
$x = array('foo' => 'bar');
|
||||
$y = array('x' => &$x);
|
||||
$x['y'] = &$y;
|
||||
$formatter->format($y);
|
||||
}
|
||||
|
||||
public function testIgnoresInvalidTypes()
|
||||
{
|
||||
// set up the recursion
|
||||
|
Reference in New Issue
Block a user