diff --git a/app/code/community/Lesti/Fpc/Model/Observer.php b/app/code/community/Lesti/Fpc/Model/Observer.php index cbb0ba1..c9b75b5 100755 --- a/app/code/community/Lesti/Fpc/Model/Observer.php +++ b/app/code/community/Lesti/Fpc/Model/Observer.php @@ -212,10 +212,13 @@ protected function _prepareLayout( array $dynamicBlocks ) { - $xml = simplexml_load_string( - $layout->getXmlString(), - Lesti_Fpc_Helper_Data::LAYOUT_ELEMENT_CLASS - ); + $xml = $layout->getNode(); + if (!is_a($xml, Lesti_Fpc_Helper_Data::LAYOUT_ELEMENT_CLASS)) { + $xml = simplexml_load_string( + $layout->getXmlString(), + Lesti_Fpc_Helper_Data::LAYOUT_ELEMENT_CLASS + ); + } $cleanXml = simplexml_load_string( '', Lesti_Fpc_Helper_Data::LAYOUT_ELEMENT_CLASS