我有這樣的例子:錯誤過濾模板:注意:反序列化()
代碼PHP:
["conditions_encoded"] => string(324) "a:2:[i:1;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Combine`;s:10:`aggregator`;s:3:`all`;s:5:`value`;s:1:`1`;s:9:`new_child`;s:0:``;]s:4:`1--1`;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Product`;s:9:`attribute`;s:12:`category_ids`;s:8:`operator`;s:2:`==`;s:5:`value`;s:3:`140`;]]"
我嘗試使用此代碼反序列化:
<?php Zend_Debug::dump(base64_decode(unserialize($block->getConditionsEncoded())));?>
,但我得到這個錯誤:
Error filtering template: Notice: unserialize(): Error at offset 0 of 324 bytes
我該如何解決這個錯誤?你認爲哪一種解決方案?
提前致謝!
我覺得'有問題,請嘗試用雙引號來替換( 「) –
你能編輯我的代碼以準確理解你的意思嗎?謝謝! – Cristi