From 5054a68bfb61d13bd109e6d040b2c903d8909261 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 29 Oct 2017 13:28:46 +0100 Subject: [PATCH] Reset origTokens in resetState() In case one pretty printer is used in both preserving and non-preserving mode. --- lib/PhpParser/PrettyPrinterAbstract.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 8923c7f..11022f7 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -152,6 +152,7 @@ abstract class PrettyPrinterAbstract protected function resetState() { $this->indentLevel = 0; $this->nl = "\n"; + $this->origTokens = null; } /**