diff --git a/src/Tracy/Dumper/Renderer.php b/src/Tracy/Dumper/Renderer.php index 3c014a4d8..ff78d3205 100644 --- a/src/Tracy/Dumper/Renderer.php +++ b/src/Tracy/Dumper/Renderer.php @@ -283,9 +283,10 @@ private function renderArray($array, int $depth): string $ref = new Value(Value::TYPE_REF, $array->id); $this->copySnapshot($ref); return '" . $out . ''; - } - return $out . (isset($this->above[$array->id]) ? ' see above' : ' see below'); + } elseif ($this->hash) { + return $out . (isset($this->above[$array->id]) ? ' see above' : ' see below'); + } } } @@ -364,9 +365,10 @@ private function renderObject(Value $object, int $depth): string $ref = new Value(Value::TYPE_REF, $object->id); $this->copySnapshot($ref); return '" . $out . ''; - } - return $out . (isset($this->above[$object->id]) ? ' see above' : ' see below'); + } elseif ($this->hash) { + return $out . (isset($this->above[$object->id]) ? ' see above' : ' see below'); + } } $collapsed = $object->collapsed ?? ($depth diff --git a/tests/Tracy/Dumper.toText().nohash.phpt b/tests/Tracy/Dumper.toText().nohash.phpt index fb431d255..8907cade1 100644 --- a/tests/Tracy/Dumper.toText().nohash.phpt +++ b/tests/Tracy/Dumper.toText().nohash.phpt @@ -37,3 +37,16 @@ stdClass z: stdClass RECURSION XX , Dumper::toText($arr, [Dumper::HASH => false])); + + +$obj = (object) ['a' => 1]; +Assert::match(<<<'XX' +array (3) + 0 => stdClass + | a: 1 + 1 => stdClass + | a: 1 + 2 => stdClass + | a: 1 +XX +, Dumper::toText([$obj, $obj, $obj], [Dumper::HASH => false]));