diff --git a/NEWS b/NEWS index feadcb10..f4cc74b1 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,8 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier - Configuration objects with different serials do not clobber each others when revision numbers are unequal - Improve Serializer DefinitionCache directory permissions checks +- DefinitionCache no longer throws errors when it encounters old + serial files that do not conform to the current style . Rewire some test-cases to swallow errors rather than expect them . HTMLDefinition printer updated with some of the new attributes . DefinitionCache keys reordered to reflect precedence: version number, diff --git a/library/HTMLPurifier/DefinitionCache.php b/library/HTMLPurifier/DefinitionCache.php index f21b0354..da18bff3 100644 --- a/library/HTMLPurifier/DefinitionCache.php +++ b/library/HTMLPurifier/DefinitionCache.php @@ -49,6 +49,7 @@ class HTMLPurifier_DefinitionCache * @param $config Instance of HTMLPurifier_Config to test against */ function isOld($key, $config) { + if (substr_count($key, '-') < 3) return true; list($version, $hash, $revision) = explode('-', $key, 3); $compare = version_compare($version, $config->version); // version mismatch, is always old