From 9f5f85952b19fac27c03e6b813970be6bbf309af Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Thu, 22 Sep 2011 11:10:12 -0400 Subject: [PATCH] Don't unset parser variable; plays poorly with serialize. Signed-off-by: Edward Z. Yang --- NEWS | 2 ++ library/HTMLPurifier/Config.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index b0773b41..1b2afd46 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,8 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier for reporting. - Do not add nofollow if hostname matches our current host. Thanks 178 for reporting, and Neike Taika-Tessaro for helping diagnose. +- Do not unset parser variable; this fixes intermittent serialization + problems. 4.3.0, released 2011-03-27 # Fixed broken caching of customized raw definitions, but requires an diff --git a/library/HTMLPurifier/Config.php b/library/HTMLPurifier/Config.php index b6551398..cef41306 100644 --- a/library/HTMLPurifier/Config.php +++ b/library/HTMLPurifier/Config.php @@ -44,7 +44,7 @@ class HTMLPurifier_Config /** * Parser for variables */ - protected $parser; + protected $parser = null; /** * Reference HTMLPurifier_ConfigSchema for value checking @@ -668,7 +668,7 @@ class HTMLPurifier_Config */ public function finalize() { $this->finalized = true; - unset($this->parser); + $this->parser = null; } /**